:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-muted: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #dbe4f0;
    --brand: #0f62fe;
    --brand-soft: #e9f1ff;
    --brand-dark: #0b3ea8;
    --success-soft: #eafaf4;
    --warning-soft: #fff6e8;
    --danger-soft: #fff1ed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body.office-layout,
body.auth-layout,
body.student-layout,
body.instructor-layout {
    margin: 0;
    font-family: "Segoe UI Variable Text", Aptos, "Trebuchet MS", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(15, 98, 254, 0.08), transparent 24%),
        linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

body.office-layout a,
body.auth-layout a,
body.student-layout a,
body.instructor-layout a {
    color: inherit;
}

body.student-layout a,
body.instructor-layout a {
    text-decoration: none;
}

body.office-layout .app-footer,
body.student-layout .app-footer,
body.instructor-layout .app-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    color: var(--muted);
}

body.auth-layout .app-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    color: var(--muted);
    font-size: 14px;
}

body.office-layout .app-footer strong,
body.auth-layout .app-footer strong,
body.student-layout .app-footer strong,
body.instructor-layout .app-footer strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
}

body.office-layout .footer-meta,
body.auth-layout .footer-meta,
body.student-layout .footer-meta,
body.instructor-layout .footer-meta {
    display: flex;
    gap: 10px 16px;
    flex-wrap: wrap;
}

/* Office Layout */
body.office-layout {
background:
                radial-gradient(circle at top left, rgba(15, 98, 254, 0.08), transparent 24%),
                linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
            color: var(--ink);
}

body.office-layout a {
color: inherit;
}

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

body.office-layout .sidebar {
position: sticky;
            top: 0;
            align-self: start;
            min-height: 100vh;
            padding: 28px 22px;
            border-right: 1px solid rgba(219, 228, 240, 0.9);
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(18px);
}

body.office-layout .sidebar-brand {
display: grid;
            gap: 6px;
            margin-bottom: 28px;
}

body.office-layout .sidebar-brand strong {
font-size: 21px;
            letter-spacing: -0.03em;
}

body.office-layout .sidebar-brand span,
body.office-layout .nav-meta,
body.office-layout .eyebrow,
body.office-layout .muted,
body.office-layout .table-subtle,
body.office-layout .metric-label,
body.office-layout .metric-meta,
body.office-layout .kicker {
color: var(--muted);
}

body.office-layout .sidebar-nav,
body.office-layout .sidebar-actions {
display: grid;
            gap: 8px;
}

body.office-layout .mobile-office-nav {
display: none;
}

body.office-layout .sidebar-section {
margin-top: 26px;
}

body.office-layout .sidebar-link,
body.office-layout .sidebar-action {
display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 14px;
            text-decoration: none;
            border: 1px solid transparent;
            color: var(--ink);
            transition: 120ms ease;
}

body.office-layout .sidebar-link:hover,
body.office-layout .sidebar-action:hover {
background: rgba(15, 98, 254, 0.05);
            border-color: rgba(15, 98, 254, 0.12);
}

body.office-layout .sidebar-link.active {
background: linear-gradient(180deg, var(--brand-soft), #ffffff);
            border-color: rgba(15, 98, 254, 0.16);
            color: var(--brand-dark);
            font-weight: 700;
}

body.office-layout .content,
body.student-layout .content {
padding: 28px;
            min-width: 0;
}

body.office-layout .topbar,
body.student-layout .topbar {
display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
            margin-bottom: 22px;
}

body.office-layout .topbar h1,
body.student-layout .topbar h1 {
margin: 6px 0 0;
            font-size: clamp(24px, 4vw, 34px);
            line-height: 1.02;
            letter-spacing: -0.05em;
}

body.office-layout .sidebar-brand,
body.student-layout .sidebar-brand,
body.student-layout .sidebar-copy {
display: grid;
            gap: 6px;
}

body.office-layout .sidebar-brand strong,
body.student-layout .sidebar-brand strong {
font-size: 21px;
            letter-spacing: -0.03em;
}

body.office-layout .sidebar-brand span,
body.office-layout .nav-meta,
body.office-layout .eyebrow,
body.office-layout .muted,
body.office-layout .table-subtle,
body.office-layout .metric-label,
body.office-layout .metric-meta,
body.office-layout .kicker,
body.student-layout .sidebar-brand span,
body.student-layout .muted,
body.student-layout .eyebrow,
body.student-layout .sidebar-copy p,
body.student-layout .meta-note {
color: var(--muted);
}

body.office-layout .eyebrow,
body.student-layout .eyebrow {
font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
}

body.student-layout .sidebar-copy p {
margin: 0;
            line-height: 1.6;
}

body.office-layout .topbar-tools,
body.student-layout .topbar-tools {
display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            justify-content: flex-end;
}

body.student-layout .topbar-logout-form {
display: flex;
}

body.office-layout .topbar-chip,
body.office-layout .pill,
body.office-layout .status-pill,
body.student-layout .chip {
display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 7px 12px;
            border-radius: 999px;
            border: 1px solid var(--line);
            background: #fff;
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
            color: var(--muted);
}

body.office-layout .topbar-chip strong,
body.student-layout .chip strong {
color: var(--ink);
            font-size: 13px;
}

body.office-layout .topbar-tools form,
body.student-layout .topbar-tools form {
margin: 0;
}

body.office-layout .topbar-tools .button,
body.student-layout .topbar-tools .button {
min-height: auto;
padding: 7px 12px;
border-radius: 999px;
font-size: 13px;
font-weight: 600;
box-shadow: none;
white-space: nowrap;
}

body.office-layout .topbar-tools .button.secondary,
body.student-layout .topbar-tools .button.secondary {
background: var(--brand-soft);
border-color: rgba(15, 98, 254, 0.18);
color: var(--brand-dark);
}

body.office-layout .topbar-tools .button.secondary:hover,
body.student-layout .topbar-tools .button.secondary:hover {
background: var(--brand);
border-color: rgba(15, 98, 254, 0.28);
color: #fff;
}

body.office-layout .stack,
body.student-layout .stack {
display: grid; gap: 20px;
}

body.office-layout .hero-card,
body.office-layout .panel,
body.office-layout .metric-card,
body.office-layout .card,
body.office-layout .table-card,
body.student-layout .hero-card,
body.student-layout .panel,
body.student-layout .metric-card,
body.student-layout .table-card {
background: var(--panel);
            border: 1px solid rgba(219, 228, 240, 0.95);
            border-radius: 24px;
            box-shadow: var(--shadow);
}

body.office-layout .hero-card,
body.student-layout .hero-card {
padding: 28px;
            background:
                radial-gradient(circle at top right, rgba(15, 98, 254, 0.08), transparent 30%),
                linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

body.office-layout .hero-card h2,
body.student-layout .hero-card h2 {
margin: 10px 0 8px;
            font-size: clamp(28px, 4vw, 38px);
            letter-spacing: -0.04em;
}

body.office-layout .hero-card p,
body.student-layout .hero-card p,
body.student-layout .section-intro p {
margin: 0;
            max-width: 760px;
            line-height: 1.65;
            color: var(--muted);
}

body.office-layout .kpi-grid,
body.office-layout .stats,
body.office-layout .card-grid,
body.student-layout .kpi-grid {
display: grid;
            grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
            gap: 16px;
}

body.office-layout .metric-card,
body.office-layout .stat,
body.office-layout .card {
padding: 20px;
}

body.office-layout .metric-value,
body.office-layout .stat b {
display: block;
            margin-top: 10px;
            font-size: clamp(22px, 3vw, 28px);
            line-height: 1;
            letter-spacing: -0.05em;
}

body.office-layout .metric-card.warning {
background: linear-gradient(180deg, #ffffff 0%, var(--warning-soft) 100%);
}

body.office-layout .metric-card.success {
background: linear-gradient(180deg, #ffffff 0%, var(--success-soft) 100%);
}

body.office-layout .metric-card.danger {
background: linear-gradient(180deg, #ffffff 0%, var(--danger-soft) 100%);
}

body.office-layout .panel,
body.office-layout .table-card,
body.student-layout .hero-card,
body.student-layout .panel,
body.student-layout .table-card {
padding: 22px;
}

body.office-layout .panel-header,
body.office-layout .toolbar {
display: flex;
            gap: 14px;
            justify-content: space-between;
            align-items: flex-start;
            flex-wrap: wrap;
}

body.office-layout .panel-title,
body.student-layout .panel-title {
margin: 6px 0 0;
            font-size: 24px;
            letter-spacing: -0.03em;
}

body.office-layout .field-grid {
display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px;
            align-items: start;
}

body.office-layout .split-grid {
display: grid;
            grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
            gap: 20px;
            align-items: start;
}

body.office-layout .field {
display: grid;
            gap: 8px;
}

body.office-layout .field.full {
grid-column: 1 / -1;
}

body.office-layout label {
font-weight: 700;
            font-size: 14px;
            color: #334155;
}

body.office-layout input,
body.office-layout select,
body.office-layout textarea {
width: 100%;
            padding: 12px 14px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: #fff;
            color: var(--ink);
            font: inherit;
            transition: 120ms ease;
}

body.office-layout input:focus,
body.office-layout select:focus,
body.office-layout textarea:focus {
outline: none;
            border-color: rgba(15, 98, 254, 0.42);
            box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.08);
}

body.office-layout .actions,
body.office-layout .filter-row,
body.office-layout .cta-row {
display: flex;
            gap: 10px;
            flex-wrap: wrap;
}

body.office-layout .student-profile-header {
display: grid;
            gap: 6px;
}

body.office-layout .student-profile-header .muted,
body.office-layout .student-profile-header h1 {
margin: 0;
}

body.office-layout .back-link {
display: inline-flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            color: var(--muted);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
}

body.office-layout .back-link:hover {
color: var(--ink);
}

body.office-layout .back-link-button {
justify-self: start;
}

body.office-layout .student-header-actions {
display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
}

body.office-layout .student-header-primary {
display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
}

body.office-layout .more-actions {
position: relative;
}

body.office-layout .more-actions-toggle {
display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 40px;
            padding: 0.7rem 1rem;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: #fff;
            color: #334155;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.1;
            cursor: pointer;
            list-style: none;
            box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.04);
}

body.office-layout .more-actions-toggle::-webkit-details-marker {
display: none;
}

body.office-layout .more-actions[open] .more-actions-toggle {
border-color: rgba(15, 98, 254, 0.18);
            color: var(--brand-dark);
            background: var(--brand-soft);
}

body.office-layout .more-actions-menu {
position: absolute;
            top: calc(100% + 8px);
            right: 0;
            z-index: 5;
            min-width: 240px;
            padding: 10px;
            border-radius: 16px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.98);
            box-shadow: var(--shadow);
            display: grid;
            gap: 8px;
}

body.office-layout .more-actions-menu form {
margin: 0;
}

body.office-layout .more-actions-menu .button {
width: 100%;
            justify-content: flex-start;
}

body.office-layout .record-actions,
body.office-layout .record-header-actions,
body.office-layout .record-header-primary {
min-width: 0;
}

body.office-layout .student-profile-grid {
margin-top: 20px;
}

body.office-layout .students-hero {
display: grid;
            gap: 20px;
}

body.office-layout .students-hero h1 {
margin: 0;
}

body.office-layout .students-metrics {
display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 14px;
}

body.office-layout .students-metrics .metric-card {
padding: 18px;
}

body.office-layout .students-metrics .metric-card strong {
font-size: 13px;
}

body.office-layout .students-filters-panel {
display: grid;
            gap: 14px;
}

body.office-layout .students-filters {
display: grid;
            gap: 12px;
}

body.office-layout .students-search {
display: grid;
            gap: 8px;
}

body.office-layout .students-search-label {
display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
}

body.office-layout .students-active-filters {
font-size: 13px;
            color: var(--muted);
}

body.office-layout .students-search-row {
display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
}

body.office-layout .students-search-row input {
max-width: 420px;
            flex: 1 1 320px;
}

body.office-layout .students-clear-link {
display: inline-flex;
            align-items: center;
            color: var(--muted);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
}

body.office-layout .students-clear-link:hover {
color: var(--ink);
}

body.office-layout .students-filter-groups {
display: grid;
            gap: 10px;
}

body.office-layout .filter-group {
display: grid;
            gap: 6px;
}

body.office-layout .students-chip-row {
display: flex;
            gap: 8px;
            flex-wrap: wrap;
}

body.office-layout .students-chip {
display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 30px;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(219, 228, 240, 0.95);
            background: rgba(255, 255, 255, 0.85);
            color: #334155;
            text-decoration: none;
            font-size: 12px;
            font-weight: 500;
            line-height: 1;
            transition: 120ms ease;
}

body.office-layout .students-chip:hover {
border-color: rgba(15, 98, 254, 0.16);
            background: rgba(15, 98, 254, 0.05);
            color: var(--brand-dark);
}

body.office-layout .students-chip.is-active {
border-color: rgba(15, 98, 254, 0.2);
            background: var(--brand-soft);
            color: var(--brand-dark);
}

body.office-layout .students-table .pill {
width: fit-content;
}

body.office-layout .students-pagination {
margin-top: 20px;
}

body.office-layout .students-pagination nav > div:first-child {
display: none;
}

body.office-layout .students-pagination nav > div:last-child {
display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
}

body.office-layout .students-pagination nav p {
margin: 0;
            color: var(--muted);
            font-size: 14px;
}

body.office-layout .students-pagination nav .relative.z-0 {
display: inline-flex;
            align-items: center;
}

body.office-layout .students-pagination nav a,
body.office-layout .students-pagination nav span[aria-current="page"] span,
body.office-layout .students-pagination nav span[aria-disabled="true"] span {
display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 36px;
            height: 36px;
            padding: 0 10px;
            border: 1px solid var(--line);
            background: #fff;
            color: #334155;
            text-decoration: none;
            font-size: 13px;
            line-height: 1;
}

body.office-layout .students-pagination nav a:hover {
background: rgba(15, 98, 254, 0.05);
            color: var(--brand-dark);
}

body.office-layout .students-pagination nav span[aria-current="page"] span {
background: var(--brand-soft);
            color: var(--brand-dark);
            border-color: rgba(15, 98, 254, 0.18);
}

body.office-layout .students-pagination nav svg {
width: 14px;
            height: 14px;
            display: block;
}

body.office-layout .students-table-row-warning {
background: rgba(181, 74, 45, 0.05);
}

body.office-layout .student-record,
body.office-layout .student-status-cluster,
body.office-layout .student-contract-summary {
display: grid;
            gap: 8px;
}

body.office-layout .student-record-meta {
display: flex;
            gap: 10px;
            flex-wrap: wrap;
            color: var(--muted);
            font-size: 14px;
}

body.office-layout .student-status-cluster .muted,
body.office-layout .student-contract-summary .muted {
line-height: 1.45;
}

body.office-layout .profile-info-card {
display: grid;
            gap: 10px;
            align-content: start;
}

body.office-layout .profile-info-card h3 {
margin-bottom: 8px;
}

body.office-layout .profile-info-card .meta-stack {
gap: 0;
}

body.office-layout .profile-info-card .meta-row {
gap: 8px;
            padding: 10px 0;
}

body.office-layout .profile-info-card .meta-row:first-child {
padding-top: 0;
}

body.office-layout .profile-info-card .label-stack {
align-items: flex-start;
}

body.office-layout .profile-empty-state {
display: grid;
            gap: 10px;
            align-content: start;
            padding: 12px 14px;
            border-radius: 16px;
            border: 1px dashed rgba(148, 163, 184, 0.5);
            background: linear-gradient(180deg, #ffffff 0%, var(--panel-muted) 100%);
}

body.office-layout .profile-empty-state p {
margin: 0;
            color: var(--muted);
            line-height: 1.55;
}

body.office-layout .profile-info-card .meta-stack > .profile-empty-state {
margin-top: 10px;
}

body.office-layout .profile-card-status {
margin: -2px 0 4px;
}

body.office-layout .compact-meta-stack {
gap: 0;
}

body.office-layout .compact-meta-stack .meta-row {
padding: 8px 0;
}

body.office-layout .compact-empty-state {
padding: 0;
            border: none;
            background: transparent;
}

body.office-layout .copy-value {
display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
}

body.office-layout .copy-email-button {
display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            padding: 0;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.36);
            background: rgba(255, 255, 255, 0.92);
            color: var(--muted);
            cursor: pointer;
            transition: 120ms ease;
}

body.office-layout .copy-email-button:hover {
border-color: rgba(15, 98, 254, 0.2);
            color: var(--brand-dark);
            background: var(--brand-soft);
}

body.office-layout .copy-email-button.is-copied {
border-color: rgba(15, 159, 110, 0.2);
            color: #116149;
            background: var(--success-soft);
}

body.office-layout .copy-email-button svg {
width: 14px;
            height: 14px;
            fill: currentColor;
}

body.office-layout .sr-only {
position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
}

body.office-layout .template-variable-card {
display: grid;
            gap: 14px;
            align-content: start;
}

body.office-layout .template-editor-target {
font-size: 14px;
}

body.office-layout .template-live-preview {
padding: 14px 16px;
            border-radius: 16px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.92);
            min-height: 120px;
            color: var(--ink);
            line-height: 1.6;
            overflow-wrap: anywhere;
}

body.office-layout .template-live-preview.is-empty {
color: var(--muted);
}

body.office-layout .template-preview-token {
display: inline;
            padding: 2px 6px;
            border-radius: 8px;
            background: var(--brand-soft);
            color: var(--brand-dark);
}

body.office-layout .template-preview-modal {
width: min(920px, calc(100vw - 32px));
            max-height: calc(100vh - 48px);
            padding: 0;
            border: none;
            border-radius: 24px;
            box-shadow: var(--shadow);
            background: #fff;
}

body.office-layout .template-preview-modal::backdrop {
background: rgba(15, 23, 42, 0.42);
}

body.office-layout .template-preview-modal-header {
display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 22px 22px 0;
}

body.office-layout .template-preview-modal-header strong {
display: block;
            margin-top: 6px;
            font-size: 20px;
            color: var(--ink);
}

body.office-layout .template-preview-modal .template-live-preview {
margin: 18px 22px 22px;
            min-height: 320px;
            max-height: calc(100vh - 180px);
            overflow: auto;
}

body.office-layout .template-inline-picker {
position: absolute;
            z-index: 20;
            padding: 10px;
            border-radius: 18px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.98);
            box-shadow: var(--shadow);
            display: grid;
            gap: 10px;
}

body.office-layout .template-inline-picker.is-hidden {
display: none;
}

body.office-layout .template-inline-picker-header {
display: grid;
            gap: 4px;
}

body.office-layout .template-inline-picker-list {
display: grid;
            gap: 6px;
            max-height: 280px;
            overflow: auto;
}

body.office-layout .template-inline-picker-item {
display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
            width: 100%;
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(219, 228, 240, 0.95);
            background: #fff;
            color: var(--ink);
            text-align: left;
            cursor: pointer;
}

body.office-layout .template-inline-picker-item.is-active,
body.office-layout .template-inline-picker-item:hover {
border-color: rgba(15, 98, 254, 0.18);
            background: var(--brand-soft);
}

body.office-layout .template-inline-picker-copy {
display: grid;
            gap: 4px;
}

body.office-layout .template-inline-picker-copy strong {
font-size: 14px;
}

body.office-layout .template-inline-picker-copy code {
font-size: 12px;
            color: var(--brand-dark);
            word-break: break-all;
}

body.office-layout .template-inline-picker-group {
font-size: 12px;
            color: var(--muted);
}

body.office-layout .template-variable-list {
display: grid;
            gap: 10px;
}

body.office-layout .template-variable-item {
display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: start;
            padding: 10px 0;
            border-bottom: 1px solid rgba(219, 228, 240, 0.72);
}

body.office-layout .template-variable-item:last-child {
padding-bottom: 0;
            border-bottom: none;
}

body.office-layout .template-variable-item.is-filter-hidden,
body.office-layout .template-variable-group.is-filter-hidden {
display: none;
}

body.office-layout .template-variable-copy {
display: grid;
            gap: 6px;
}

body.office-layout .template-variable-copy strong {
font-size: 14px;
}

body.office-layout .template-variable-copy code {
font-size: 12px;
            color: var(--brand-dark);
            word-break: break-all;
}

body.office-layout textarea.is-active-editor {
border-color: rgba(15, 98, 254, 0.28);
            box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.08);
}


body.office-layout .button,
body.student-layout .button {
display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: auto;
            min-height: 40px;
            padding: 0.7rem 2rem;
            border-radius: 12px;
            border: 1px solid transparent;
            font: inherit;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.1;
            background: #fff;
            color: var(--ink);
            box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.04);
            cursor: pointer;
}

body.office-layout .button.small {
min-height: 36px;
            padding: 8px 12px;
            font-size: 13px;
            border-radius: 10px;
}

body.office-layout .button.primary,
body.student-layout .button.primary {
background: linear-gradient(180deg, #1d6dff 0%, var(--brand) 100%);
            color: white;
            border-color: rgba(15, 98, 254, 0.24);
}

body.office-layout .button.secondary,
body.student-layout .button.secondary {
background: transparent;
            border-color: var(--brand-dark);
            color: var(--brand-dark);
            box-shadow: none;
}

body.office-layout .button.tertiary {
background: rgba(255, 255, 255, 0.94);
            border-color: rgba(219, 228, 240, 0.95);
            color: #475569;
            box-shadow: none;
}

body.office-layout .button.tertiary:hover {
background: var(--panel-muted);
            border-color: rgba(148, 163, 184, 0.36);
            color: var(--ink);
}

body.office-layout .button.danger {
background: transparent;
            border-color: rgba(194, 65, 12, 0.28);
            color: #9a3412;
            box-shadow: none;
}

body.office-layout .button.success {
background: linear-gradient(180deg, #1cb977 0%, #159f6e 100%);
            border-color: rgba(21, 159, 110, 0.24);
            color: #fff;
            box-shadow: none;
}

body.office-layout .button.success:hover {
background: linear-gradient(180deg, #18aa6d 0%, #128b60 100%);
            border-color: rgba(21, 159, 110, 0.32);
}

body.office-layout .button.danger:hover {
background: #9a3412;
            border-color: #9a3412;
            color: #fff;
}

body.office-layout .danger-zone {
border-color: rgba(194, 65, 12, 0.14);
            background: linear-gradient(180deg, #ffffff 0%, #fff9f7 100%);
}

body.office-layout .danger-confirm {
min-width: min(100%, 360px);
}

body.office-layout .danger-toggle {
display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 40px;
            padding: 0.7rem 2rem;
            border-radius: 12px;
            border: 1px solid rgba(194, 65, 12, 0.28);
            background: transparent;
            color: #9a3412;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.1;
            cursor: pointer;
            list-style: none;
}

body.office-layout .danger-toggle::-webkit-details-marker {
display: none;
}

body.office-layout .danger-confirm[open] .danger-toggle {
background: #9a3412;
            border-color: #9a3412;
            color: #fff;
}

body.office-layout .danger-confirm-body {
margin-top: 14px;
            padding: 16px 18px;
            border-radius: 16px;
            border: 1px solid rgba(194, 65, 12, 0.14);
            background: var(--danger-soft);
            color: #7c2d12;
            display: grid;
            gap: 10px;
}

body.office-layout .danger-confirm-body p {
margin: 0;
            line-height: 1.55;
}

body.office-layout .danger-actions {
display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
}

body.office-layout .danger-disabled {
opacity: 0.72;
            cursor: not-allowed;
            pointer-events: none;
}

body.office-layout .surface-note {
padding: 14px 16px;
            border-radius: 16px;
            background: var(--panel-muted);
            border: 1px solid var(--line);
            color: var(--muted);
            line-height: 1.55;
}

body.office-layout .actions-stack {
display: grid;
            gap: 8px;
            justify-items: start;
}

body.office-layout .section-intro {
display: grid;
            gap: 6px;
}

body.office-layout .section-intro h2,
body.office-layout .section-intro h3 {
margin: 0;
            font-size: 24px;
            letter-spacing: -0.03em;
}

body.office-layout .section-intro p {
margin: 0;
            color: var(--muted);
            line-height: 1.6;
}

body.office-layout .table-wrap {
width: 100%; overflow-x: auto;
            max-width: 100%;
}

body.office-layout .topbar,
body.office-layout .panel,
body.office-layout .table-card,
body.office-layout .table-wrap {
min-width: 0;
            max-width: 100%;
}

body.office-layout .dense-table {
min-width: 980px;
}

body.office-layout table,
body.student-layout table {
width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin-top: 18px;
}

body.student-layout .table-scroll {
overflow-x: auto;
            -webkit-overflow-scrolling: touch;
}

body.office-layout th,
body.student-layout th {
padding: 12px 14px;
            border-bottom: 1px solid var(--line);
            text-align: left;
            font-size: 12px;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-weight: 700;
}

body.office-layout td,
body.student-layout td {
padding: 16px 14px;
            border-bottom: 1px solid rgba(219, 228, 240, 0.72);
            text-align: left;
            vertical-align: top;
}

body.office-layout tbody tr:hover {
background: rgba(248, 250, 252, 0.82);
}

body.office-layout .alert,
body.office-layout .error-box,
body.student-layout .alert {
padding: 14px 16px;
            border-radius: 16px;
            border: 1px solid var(--line);
}

body.office-layout .alert,
body.student-layout .alert {
border-color: rgba(15, 159, 110, 0.18);
            background: var(--success-soft);
            color: #116149;
}

body.office-layout .error-box {
border-color: rgba(194, 65, 12, 0.18);
            background: var(--danger-soft);
            color: #9a3412;
}

body.office-layout .error-list {
margin: 8px 0 0; padding-left: 18px;
}

body.office-layout .pill.success,
body.office-layout .status-pill.success,
body.student-layout .status-pill.success {
background: var(--success-soft); border-color: rgba(15, 159, 110, 0.16); color: #116149;
}

body.office-layout .pill.warning,
body.office-layout .status-pill.warning,
body.student-layout .status-pill.warning {
background: var(--warning-soft); border-color: rgba(180, 83, 9, 0.14); color: #9a3412;
}

body.office-layout .pill.danger,
body.office-layout .status-pill.danger {
background: var(--danger-soft); border-color: rgba(194, 65, 12, 0.14); color: #9a3412;
}

body.office-layout .pill.info,
body.office-layout .status-pill.info,
body.student-layout .status-pill.info {
background: var(--brand-soft); border-color: rgba(15, 98, 254, 0.14); color: var(--brand-dark);
}

body.office-layout .summary-grid,
body.student-layout .summary-grid {
display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
}

body.office-layout .meta-card,
body.student-layout .meta-card {
padding: 20px;
            border-radius: 20px;
            background: linear-gradient(180deg, #ffffff 0%, var(--panel-muted) 100%);
            border: 1px solid var(--line);
}

body.office-layout .meta-card h3,
body.student-layout .meta-card h3 {
margin: 0 0 16px;
            font-size: 18px;
            letter-spacing: -0.03em;
}

body.office-layout .meta-stack {
display: grid;
            gap: 14px;
}

body.office-layout .meta-row,
body.student-layout .meta-row {
display: grid;
            gap: 4px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(219, 228, 240, 0.72);
}

body.office-layout .meta-row:last-child,
body.student-layout .meta-row:last-child {
padding-bottom: 0;
            border-bottom: none;
}

body.office-layout .meta-row strong {
font-size: 15px;
}

body.office-layout .label-stack {
display: inline-grid;
            gap: 6px;
}

body.office-layout .form-shell {
display: grid;
            gap: 20px;
}

body.office-layout .form-actions,
body.student-layout .form-actions {
display: flex;
            gap: 12px;
            flex-wrap: wrap;
            justify-content: flex-start;
            align-items: center;
}

body.office-layout .form-actions .button,
body.student-layout .form-actions .button {
font-size: 14px;
font-weight: 600;
padding: 10px 15px;
}

body.office-layout .form-actions .button.secondary,
body.student-layout .form-actions .button.secondary {
background: var(--panel-muted);
border-color: var(--line);
color: #334155;
}

body.office-layout .form-actions .button.secondary:hover,
body.student-layout .form-actions .button.secondary:hover {
background: #e9eef6;
border-color: #cbd5e1;
color: #0f172a;
}

body.office-layout .toggle-pill {
display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: #fff;
            font-weight: 600;
}

body.office-layout .toggle-pill input {
width: auto;
            margin: 0;
}

body.office-layout .field-hint {
font-size: 13px;
            color: var(--muted);
            line-height: 1.45;
}

body.office-layout .compact-list {
margin: 0;
            padding-left: 18px;
            display: grid;
            gap: 8px;
}

body.office-layout .info-list {
display: grid;
            gap: 14px;
            margin: 0;
}

body.office-layout .info-row {
display: flex;
            gap: 12px;
            justify-content: space-between;
            border-bottom: 1px solid rgba(219, 228, 240, 0.72);
            padding-bottom: 12px;
}

body.office-layout .info-row:last-child {
border-bottom: none;
            padding-bottom: 0;
}

body.office-layout pre {
margin: 0;
            padding: 18px;
            border-radius: 18px;
            background: #0f172a;
            color: #dbeafe;
            overflow-x: auto;
            font-size: 13px;
}

body.office-layout .app-footer,
body.student-layout .app-footer,
body.instructor-layout .app-footer {
display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 24px 32px;
            flex-wrap: wrap;
            margin-top: 28px;
            padding: 32px;
            border-radius: 24px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.85);
            color: var(--muted);
}

body.office-layout .app-footer strong,
body.student-layout .app-footer strong,
body.instructor-layout .app-footer strong {
display: block;
            margin-bottom: 6px;
            color: var(--ink);
            font-weight: 700;
}

body.office-layout .footer-copy,
body.student-layout .footer-copy,
body.instructor-layout .footer-copy {
max-width: 520px;
}

body.office-layout .footer-copy > span,
body.student-layout .footer-copy > span,
body.instructor-layout .footer-copy > span {
color: #64748b;
}

body.office-layout .footer-meta,
body.student-layout .footer-meta,
body.instructor-layout .footer-meta {
display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
            line-height: 1.4;
            font-size: 12px;
            text-align: left;
            min-width: 240px;
}

body.office-layout .footer-meta span,
body.student-layout .footer-meta span,
body.instructor-layout .footer-meta span {
padding: 0;
}

body.office-layout .footer-meta span:first-child,
body.student-layout .footer-meta span:first-child,
body.instructor-layout .footer-meta span:first-child {
padding-left: 0;
}

body.office-layout .footer-contact-item,
body.student-layout .footer-contact-item,
body.instructor-layout .footer-contact-item {
display: inline-flex;
            align-items: flex-start;
            gap: 10px;
}

body.office-layout .footer-icon,
body.student-layout .footer-icon,
body.instructor-layout .footer-icon {
width: 16px;
            height: 16px;
            flex: 0 0 16px;
            color: #64748b;
            margin-top: 1px;
}

body.office-layout .footer-link,
body.student-layout .footer-link,
body.instructor-layout .footer-link {
color: inherit;
            text-decoration: none;
            transition: color 0.18s ease;
}

body.office-layout .footer-link:hover,
body.student-layout .footer-link:hover,
body.instructor-layout .footer-link:hover {
color: var(--brand);
}

@media (max-width: 768px) {
body.office-layout .app-footer,
body.student-layout .app-footer,
body.instructor-layout .app-footer {
flex-direction: column;
                justify-content: flex-start;
                gap: 20px;
                padding: 24px;
}

body.office-layout .footer-meta,
body.student-layout .footer-meta,
body.instructor-layout .footer-meta {
gap: 12px;
}

body.office-layout .dashboard-shell {
grid-template-columns: 1fr;
}

body.office-layout .sidebar {
display: none;
}

body.office-layout .content {
padding: 18px 14px 28px;
}

body.office-layout .topbar {
flex-direction: column;
                align-items: stretch;
                gap: 14px;
}

body.office-layout .topbar-tools {
justify-content: flex-start;
}

body.office-layout .mobile-office-nav {
display: grid;
                grid-auto-flow: column;
                grid-auto-columns: max-content;
                gap: 10px;
                margin-bottom: 18px;
                padding: 2px 2px 8px;
                overflow-x: auto;
                overscroll-behavior-x: contain;
                scrollbar-width: none;
}

body.office-layout .mobile-office-nav::-webkit-scrollbar {
display: none;
}

body.office-layout .mobile-office-nav .sidebar-link {
justify-content: center;
                white-space: nowrap;
                min-height: 42px;
                padding: 10px 14px;
                border-radius: 999px;
                border: 1px solid rgba(219, 228, 240, 0.95);
                background: #fff;
                box-shadow: var(--shadow-soft);
}

body.office-layout .record-header-actions,
body.office-layout .record-header-primary,
body.office-layout .record-actions {
display: grid;
                gap: 10px;
                width: 100%;
                grid-template-columns: minmax(0, 1fr);
}

body.office-layout .student-header-actions,
body.office-layout .student-header-primary,
body.office-layout .actions.record-header-actions,
body.office-layout .actions.record-actions {
display: grid;
                gap: 10px;
                width: 100%;
                grid-template-columns: minmax(0, 1fr);
                justify-content: stretch;
}

body.office-layout .record-header-actions > .button,
body.office-layout .record-header-primary > .button,
body.office-layout .record-actions > form,
body.office-layout .record-actions > form .button,
body.office-layout .record-more-actions,
body.office-layout .record-more-actions > summary {
width: 100%;
}

body.office-layout .student-header-primary > .button,
body.office-layout .student-header-actions > .button,
body.office-layout .student-header-actions > .more-actions,
body.office-layout .student-header-actions > .more-actions > summary,
body.office-layout .actions.record-header-actions > .button,
body.office-layout .actions.record-actions > form,
body.office-layout .actions.record-actions > form .button {
width: 100%;
}

body.office-layout .record-actions > form {
margin: 0;
}

body.office-layout .record-actions > form .button,
body.office-layout .record-header-actions > .button,
body.office-layout .record-header-primary > .button,
body.office-layout .record-more-actions > summary {
justify-content: center;
}

body.office-layout .student-header-primary > .button,
body.office-layout .student-header-actions > .button,
body.office-layout .student-header-actions > .more-actions > summary,
body.office-layout .actions.record-header-actions > .button,
body.office-layout .actions.record-actions > form .button {
justify-content: center;
}

body.office-layout .record-more-actions {
position: relative;
}

body.office-layout .record-more-actions .more-actions-menu {
position: static;
                right: auto;
                top: auto;
                min-width: 0;
                width: 100%;
                margin-top: 8px;
                box-shadow: none;
}

body.office-layout .toolbar {
flex-direction: column;
                align-items: stretch;
}

body.office-layout .field-grid {
grid-template-columns: 1fr;
}

body.office-layout .split-grid {
grid-template-columns: 1fr;
}
}

/* Auth Layout */
body.auth-layout {
color: var(--ink);
            background:
                radial-gradient(circle at top left, rgba(15, 98, 254, 0.08), transparent 24%),
                linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

body.auth-layout a {
color: inherit;
}

body.auth-layout .auth-shell {
min-height: 100vh;
            display: grid;
            grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
}

body.auth-layout .auth-side {
padding: 36px 30px;
            border-right: 1px solid rgba(219, 228, 240, 0.9);
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(18px);
            display: grid;
            align-content: start;
            grid-template-rows: auto auto auto 1fr auto;
            gap: 22px;
}

body.auth-layout .muted,
body.auth-layout .eyebrow,
body.auth-layout .side-copy p,
body.auth-layout .info-card p,
body.auth-layout .field-hint {
color: var(--muted);
}

body.auth-layout .info-stack {
display: grid; gap: 14px;
}

body.auth-layout .auth-main {
display: grid; place-items: center; padding: 32px 24px;
}

body.auth-layout .auth-card {
width: min(100%, 620px);
            padding: 28px;
            border-radius: 24px;
            background: var(--panel);
            border: 1px solid rgba(219, 228, 240, 0.95);
            box-shadow: var(--shadow);
}

body.auth-layout .section-intro {
display: grid; gap: 8px;
}

body.auth-layout .section-intro h2 {
margin: 0; font-size: clamp(30px, 4vw, 40px); line-height: 1; letter-spacing: -0.05em;
}

body.auth-layout .section-intro p {
margin: 0; line-height: 1.65; color: var(--muted);
}

body.auth-layout .eyebrow {
font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}

body.auth-layout .form-shell {
display: grid; gap: 18px; margin-top: 22px;
}

body.auth-layout .field {
display: grid; gap: 8px;
}

body.auth-layout label {
font-weight: 700; font-size: 14px; color: #334155;
}

body.auth-layout .toggle-pill {
display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            align-self: flex-start;
            width: auto;
            max-width: 100%;
            margin-top: 2px;
            text-align: left;
            font-weight: 500;
            line-height: 1.3;
            cursor: pointer;
}

body.auth-layout .toggle-pill input {
width: 16px;
            height: 16px;
            margin: 0;
            flex: 0 0 auto;
}

body.auth-layout input,
body.auth-layout select,
body.auth-layout textarea {
width: 100%;
            padding: 12px 14px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: #fff;
            color: var(--ink);
            font: inherit;
            transition: 120ms ease;
}

body.auth-layout input:focus,
body.auth-layout select:focus,
body.auth-layout textarea:focus {
outline: none;
            border-color: rgba(15, 98, 254, 0.42);
            box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.08);
}

body.auth-layout .form-actions {
display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}

body.auth-layout .button {
display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: auto;
            min-height: 40px;
            padding: 0.7rem 2rem;
            border-radius: 12px;
            border: 1px solid transparent;
            font: inherit;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.1;
            background: #fff;
            color: var(--ink);
            box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.04);
            cursor: pointer;
}

body.auth-layout .button.primary {
background: linear-gradient(180deg, #1d6dff 0%, var(--brand) 100%); color: white; border-color: rgba(15, 98, 254, 0.24);
}

body.auth-layout .button.secondary {
background: transparent; border-color: var(--brand-dark); color: var(--brand-dark); box-shadow: none;
            padding: 0.7rem 2rem;
}

body.auth-layout .button.secondary:hover {
background: rgba(34, 53, 78, 0.06);
}

body.auth-layout .alert,
body.auth-layout .error-box {
margin-top: 18px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line);
}

body.auth-layout .alert {
border-color: rgba(15, 159, 110, 0.18); background: var(--success-soft); color: #116149;
}

body.auth-layout .error-box {
border-color: rgba(194, 65, 12, 0.18); background: var(--danger-soft); color: #9a3412;
}

body.auth-layout .error-list {
margin: 8px 0 0; padding-left: 18px;
}

body.auth-layout .app-footer {
display: flex;
            justify-content: space-between;
            gap: 14px;
            flex-wrap: wrap;
            margin-top: 28px;
            padding: 18px 20px;
            border-radius: 20px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.85);
            color: rgba(86, 93, 110, 0.88);
            font-size: 14px;
            line-height: 1.4;
}

body.auth-layout .app-footer > div:first-child {
display: grid;
            gap: 6px;
}

body.auth-layout .app-footer strong {
margin: 0;
            line-height: 1.15;
            color: rgba(26, 30, 43, 0.92);
}

body.auth-layout .footer-meta {
display: flex;
            gap: 10px 16px;
            flex-wrap: wrap;
            text-align: left;
            line-height: 1.4;
            color: rgba(86, 93, 110, 0.88);
}

body.auth-layout .footer-meta span {
padding: 0;
}

body.auth-layout .footer-meta span:first-child {
padding-left: 0;
}

body.auth-layout .footer-copy > span {
color: #64748b;
}

body.auth-layout .footer-contact-item {
display: inline-flex;
            align-items: flex-start;
            gap: 10px;
}

body.auth-layout .footer-icon {
width: 16px;
            height: 16px;
            flex: 0 0 16px;
            color: #64748b;
            margin-top: 1px;
}

body.auth-layout .footer-link {
color: inherit;
            text-decoration: none;
            transition: color 0.18s ease;
}

body.auth-layout .footer-link:hover {
color: var(--brand);
}

/* Unified Footer */
body.office-layout .app-footer,
body.auth-layout .app-footer,
body.student-layout .app-footer,
body.instructor-layout .app-footer {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 24px 32px;
flex-wrap: wrap;
margin-top: 28px;
padding: 32px;
border-radius: 24px;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.85);
color: var(--muted);
font-size: 14px;
line-height: 1.45;
text-align: left;
}

body.office-layout .app-footer strong,
body.auth-layout .app-footer strong,
body.student-layout .app-footer strong,
body.instructor-layout .app-footer strong {
display: block;
margin: 0 0 6px;
color: var(--ink);
font-weight: 700;
line-height: 1.15;
}

body.office-layout .footer-copy,
body.auth-layout .footer-copy,
body.student-layout .footer-copy,
body.instructor-layout .footer-copy {
max-width: 520px;
}

body.office-layout .footer-copy > span,
body.auth-layout .footer-copy > span,
body.student-layout .footer-copy > span,
body.instructor-layout .footer-copy > span {
color: #64748b;
}

body.office-layout .footer-meta,
body.auth-layout .footer-meta,
body.student-layout .footer-meta,
body.instructor-layout .footer-meta {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 10px;
line-height: 1.4;
font-size: 12px;
text-align: left;
min-width: 240px;
margin-top: 0;
}

body.office-layout .footer-contact-item,
body.auth-layout .footer-contact-item,
body.student-layout .footer-contact-item,
body.instructor-layout .footer-contact-item {
display: inline-flex;
align-items: flex-start;
gap: 10px;
}

body.office-layout .footer-icon,
body.auth-layout .footer-icon,
body.student-layout .footer-icon,
body.instructor-layout .footer-icon {
width: 16px;
height: 16px;
flex: 0 0 16px;
color: #64748b;
margin-top: 1px;
}

body.office-layout .footer-link,
body.auth-layout .footer-link,
body.student-layout .footer-link,
body.instructor-layout .footer-link {
color: inherit;
text-decoration: none;
transition: color 0.18s ease;
}

body.office-layout .footer-link:hover,
body.auth-layout .footer-link:hover,
body.student-layout .footer-link:hover,
body.instructor-layout .footer-link:hover {
color: var(--brand);
}

@media (max-width: 768px) {
body.office-layout .app-footer,
body.auth-layout .app-footer,
body.student-layout .app-footer,
body.instructor-layout .app-footer {
flex-direction: column;
justify-content: flex-start;
gap: 20px;
padding: 24px;
}

body.office-layout .footer-meta,
body.auth-layout .footer-meta,
body.student-layout .footer-meta,
body.instructor-layout .footer-meta {
gap: 12px;
min-width: 0;
}
}

@media (max-width: 980px) {
body.auth-layout .auth-shell {
grid-template-columns: 1fr;
}

body.auth-layout .auth-side {
border-right: none; border-bottom: 1px solid rgba(219, 228, 240, 0.9);
}

body.auth-layout .auth-main {
padding: 22px 14px 28px;
}

body.auth-layout .auth-card {
padding: 22px;
}
}

/* Student Layout */
body.student-layout {
color: var(--ink);
            background:
                radial-gradient(circle at top left, rgba(15, 98, 254, 0.08), transparent 24%),
                linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
            overflow-x: hidden;
}

body.student-layout a {
color: inherit; text-decoration: none;
}

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

body.student-layout .content {
min-width: 0;
}

body.student-layout .sidebar {
min-height: 100vh;
            padding: 28px 22px;
            border-right: 1px solid rgba(219, 228, 240, 0.9);
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(18px);
            display: grid;
            align-content: space-between;
            gap: 28px;
}

body.student-layout .mobile-student-nav {
display: none;
}

body.student-layout .metric-card {
padding: 20px;
}

body.student-layout .metric-card,
body.student-layout .meta-card,
body.student-layout .hero-card,
body.student-layout .table-card {
min-width: 0;
}

body.student-layout .metric-card strong {
display: block; color: var(--muted); font-size: 13px;
}

body.student-layout .metric-value {
display: block; margin-top: 10px; font-size: clamp(22px, 3vw, 28px); line-height: 1; letter-spacing: -0.05em;
}

body.student-layout .metric-value-compact {
font-size: 24px;
}

body.student-layout .metric-value-secondary {
font-size: 22px;
line-height: 1.2;
letter-spacing: -0.03em;
word-break: break-word;
}

body.student-layout .metric-card.info {
background: linear-gradient(180deg, #ffffff 0%, var(--brand-soft) 100%);
}

body.student-layout .metric-card.warning {
background: linear-gradient(180deg, #ffffff 0%, var(--warning-soft) 100%);
}

body.student-layout .status-pill {
display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--muted);
}

body.student-layout .status-pill.success {
background: var(--success-soft); color: #116149; border-color: rgba(15, 159, 110, 0.16);
}

body.student-layout .status-pill.info {
background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(15, 98, 254, 0.16);
}

body.student-layout .status-pill.warning {
background: var(--warning-soft); color: #9a3412; border-color: rgba(180, 83, 9, 0.16);
}

body.student-layout .button.secondary:hover {
background: rgba(34, 53, 78, 0.06);
}

body.student-layout .student-documents-card {
display: grid;
gap: 10px;
}

body.student-layout .student-section-lead {
  margin: 0 0 4px;
  max-width: 760px;
  line-height: 1.6;
  color: var(--muted);
}

body.office-layout .student-section-lead {
  margin: 0 0 4px;
  max-width: 760px;
  line-height: 1.6;
  color: var(--muted);
}

body.student-layout .availability-form {
  display: grid;
  gap: 14px;
}

body.instructor-layout .availability-form {
  display: grid;
  gap: 14px;
}

body.student-layout .availability-field {
  display: grid;
  gap: 6px;
}

body.instructor-layout .availability-field {
  display: grid;
  gap: 6px;
}

body.student-layout .availability-field input,
body.student-layout .availability-field select,
body.student-layout .availability-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

body.instructor-layout .availability-field input,
body.instructor-layout .availability-field select,
body.instructor-layout .availability-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

body.student-layout .availability-field textarea {
  min-height: 96px;
  resize: vertical;
}

body.instructor-layout .availability-field textarea {
  min-height: 96px;
  resize: vertical;
}

body.student-layout .availability-field input:focus,
body.student-layout .availability-field select:focus,
body.student-layout .availability-field textarea:focus {
    outline: none;
    border-color: rgba(15, 98, 254, 0.42);
    box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.08);
}

body.instructor-layout .availability-field input:focus,
body.instructor-layout .availability-field select:focus,
body.instructor-layout .availability-field textarea:focus {
    outline: none;
    border-color: rgba(15, 98, 254, 0.42);
    box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.08);
}

body.student-layout .availability-time-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.instructor-layout .availability-time-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.student-layout .availability-board {
  display: grid;
  gap: 12px;
}

body.instructor-layout .availability-board {
  display: grid;
  gap: 12px;
}

body.student-layout .availability-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

body.instructor-layout .availability-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

body.student-layout .availability-day-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(219, 228, 240, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.instructor-layout .availability-day-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(219, 228, 240, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.student-layout .availability-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

body.instructor-layout .availability-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

body.student-layout .availability-slot-list {
  display: grid;
  gap: 10px;
}

body.instructor-layout .availability-slot-list {
  display: grid;
  gap: 10px;
}

body.student-layout .availability-slot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(219, 228, 240, 0.72);
}

body.instructor-layout .availability-slot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(219, 228, 240, 0.72);
}

body.student-layout .availability-slot:first-child {
  padding-top: 0;
  border-top: none;
}

body.instructor-layout .availability-slot:first-child {
  padding-top: 0;
  border-top: none;
}

body.student-layout .availability-slot div {
  display: grid;
  gap: 4px;
}

body.instructor-layout .availability-slot div {
  display: grid;
  gap: 4px;
}

body.student-layout .schedule-board,
body.instructor-layout .schedule-board {
  display: grid;
  gap: 12px;
}

body.student-layout .schedule-day-card,
body.instructor-layout .schedule-day-card {
  align-content: start;
}

body.student-layout .schedule-board .availability-days,
body.instructor-layout .schedule-board .availability-days {
  grid-template-columns: minmax(0, 1fr);
}

body.student-layout .schedule-slot-list,
body.instructor-layout .schedule-slot-list {
  display: grid;
  gap: 12px;
}

body.student-layout .schedule-slot,
body.instructor-layout .schedule-slot {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(219, 228, 240, 0.92);
  background: #fff;
}

body.student-layout .schedule-slot-time,
body.instructor-layout .schedule-slot-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.student-layout .schedule-slot-grid,
body.instructor-layout .schedule-slot-grid {
  display: grid;
  gap: 10px;
}

body.student-layout .schedule-slot-line,
body.instructor-layout .schedule-slot-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

body.student-layout .schedule-slot-line strong,
body.instructor-layout .schedule-slot-line strong {
  text-align: right;
}

body.instructor-layout .schedule-slot-line a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.22);
}

body.instructor-layout .schedule-slot-line a:hover {
  border-bottom-color: rgba(15, 23, 42, 0.52);
}

body.student-layout .hours-history-card,
body.instructor-layout .hours-history-card {
  display: grid;
  gap: 12px;
}

body.student-layout .hours-history-list,
body.instructor-layout .hours-history-list {
  display: grid;
  gap: 12px;
}

body.student-layout .hours-history-entry-head,
body.instructor-layout .hours-history-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.student-layout .hours-history-entry-title,
body.instructor-layout .hours-history-entry-title {
  display: grid;
  gap: 4px;
}

body.student-layout .hours-history-entry-title strong,
body.instructor-layout .hours-history-entry-title strong {
  font-size: 18px;
  line-height: 1.1;
}

body.student-layout .hours-history-entry-badges,
body.instructor-layout .hours-history-entry-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.student-layout .hours-history-empty,
body.instructor-layout .hours-history-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

body.student-layout .availability-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

body.office-layout .planning-board {
  display: grid;
  gap: 12px;
}

body.office-layout .planning-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

body.office-layout .planning-day-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(219, 228, 240, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.office-layout .planning-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

body.office-layout .planning-block {
  display: grid;
  gap: 8px;
}

body.office-layout .planning-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

body.office-layout .planning-items {
  display: grid;
  gap: 8px;
}

body.office-layout .planning-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(219, 228, 240, 0.85);
  background: rgba(255, 255, 255, 0.94);
}

body.office-layout .planning-item strong {
  line-height: 1.35;
}

body.office-layout .planning-item span {
  color: var(--muted);
  line-height: 1.45;
}

body.office-layout .planning-item-with-color {
  border-left: 4px solid var(--instructor-color, #2563EB);
}

body.office-layout .planning-item-instructor {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--instructor-color, #2563EB) 14%, white);
}

body.office-layout .planning-item-proposal {
  background: linear-gradient(180deg, #ffffff 0%, var(--warning-soft) 100%);
}

body.office-layout .planning-item-lesson {
  background: linear-gradient(180deg, #ffffff 0%, var(--success-soft) 100%);
}

body.office-layout .instructor-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.office-layout .inline-instructor-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.office-layout .instructor-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 10px;
  background: var(--instructor-color, #2563EB);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

body.office-layout .color-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.office-layout .color-field input[type="color"] {
  width: 52px;
  height: 40px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: pointer;
}

body.office-layout .color-note {
  line-height: 1.45;
}

body.office-layout .planner-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

body.office-layout .planner-sidebar {
  display: grid;
  gap: 20px;
}

body.office-layout .planner-calendar-card {
  overflow: hidden;
}

body.office-layout .planner-student-list {
  display: grid;
  gap: 10px;
}

body.office-layout .planner-student-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(219, 228, 240, 0.9);
  background: rgba(255, 255, 255, 0.94);
}

body.office-layout .office-weekly-planner {
  margin-top: 18px;
}

body.office-layout .planner-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
}

body.office-layout .planner-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(219, 228, 240, 0.9);
  background: rgba(248, 250, 252, 0.92);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1;
}

body.office-layout .fc {
  --fc-border-color: rgba(219, 228, 240, 0.95);
  --fc-page-bg-color: #fff;
  --fc-neutral-bg-color: #f8fafc;
  --fc-list-event-hover-bg-color: #f8fafc;
}

body.office-layout .fc table {
  width: 100%;
  margin-top: 0;
  border-collapse: collapse;
  border-spacing: 0;
}

body.office-layout .fc th,
body.office-layout .fc td {
  padding: 0;
  border-bottom: 0;
  vertical-align: top;
}

body.office-layout .fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 12px;
}

body.office-layout .fc .fc-col-header-cell-cushion,
body.office-layout .fc .fc-datagrid-cell-cushion {
  padding: 10px 12px;
  font-weight: 700;
  color: var(--text);
}

body.office-layout .fc .fc-timegrid-slot-label {
  vertical-align: top;
}

body.office-layout .fc .fc-timegrid-slot-label-frame {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  height: 100%;
  padding-top: 0;
}

body.office-layout .fc .fc-timegrid-slot-label-cushion {
  padding: 2px 8px 0 0;
  font-weight: 700;
  line-height: 1;
}

body.office-layout .fc .fc-resource {
  font-weight: 700;
}

body.office-layout .fc .fc-event.fc-proposal-event,
body.office-layout .fc .fc-event.fc-lesson-event {
  border-width: 2px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.office-layout .fc .fc-event.fc-availability-event {
  box-shadow: none;
  pointer-events: none;
  border-width: 1px;
  border-style: solid;
  border-radius: 12px;
  z-index: 1;
  color: #0f172a;
}

body.office-layout .fc .fc-event.fc-proposal-event,
body.office-layout .fc .fc-event.fc-lesson-event {
  z-index: 3;
}

body.office-layout .fc .fc-event.fc-proposal-event {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #fff5dc 100%);
}

body.office-layout .fc .fc-event.fc-accepted-proposal-event {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #eafaf4 100%);
}

body.office-layout .fc .fc-event.fc-proposal-event.fc-ai-proposal-event {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #e0f2fe 100%);
  border-style: dashed;
}

body.office-layout .fc .fc-event.fc-lesson-event {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #e8f7ef 100%);
}

body.office-layout .fc .fc-event.fc-canceled-lesson-event {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #fff1ed 100%);
  opacity: 0.78;
}

body.office-layout .planner-event-content {
  display: grid;
  gap: 2px;
  padding: 2px 4px;
}

body.office-layout .planner-event-content strong {
  font-size: 0.94rem;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.office-layout .planner-event-content span {
  font-size: 0.78rem;
  line-height: 1.3;
  color: rgba(15, 23, 42, 0.88);
  font-weight: 600;
}

body.office-layout .planner-availability-content {
  display: grid;
  gap: 2px;
  padding: 3px 5px;
}

body.office-layout .planner-availability-content strong {
  font-size: 0.7rem;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
}

body.office-layout .planner-availability-content span {
  font-size: 0.68rem;
  line-height: 1.2;
  color: rgba(15, 23, 42, 0.92);
  font-weight: 700;
}

body.office-layout .planner-resource-label {
  display: grid;
  gap: 3px;
  padding: 4px 0;
}

body.office-layout .planner-resource-label strong {
  font-size: 0.85rem;
  line-height: 1.2;
}

body.office-layout .planner-resource-label span {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--muted);
}

body.office-layout .planner-selection-card {
  min-height: 120px;
}

body.office-layout .planner-selection-body {
  display: grid;
  gap: 8px;
}

body.office-layout .planner-selection-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

body.office-layout .planner-selection-meta {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

body.office-layout .planner-selection-meta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

body.office-layout .planner-availability-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 2px;
}

body.office-layout .planner-availability-list li {
  color: var(--muted);
}

body.office-layout .planner-slot-modal[hidden] {
  display: none;
}

body.office-layout .planner-slot-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

body.office-layout .planner-slot-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

body.office-layout .planner-slot-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 20px;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(219, 228, 240, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

body.office-layout .planner-slot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

body.office-layout .planner-slot-header h3 {
  margin: 6px 0 4px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

body.office-layout .planner-slot-body {
  display: grid;
  gap: 12px;
}

body.office-layout .planner-slot-candidate {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(219, 228, 240, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.office-layout .planner-slot-candidate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.office-layout .planner-slot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.office-layout .planner-confirm-modal[hidden] {
  display: none;
}

body.office-layout .planner-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

body.office-layout .planner-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

body.office-layout .planner-confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  margin: 15vh auto 0;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(219, 228, 240, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

body.office-layout .planner-confirm-dialog h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

body.office-layout .planner-confirm-dialog p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

body.office-layout .planner-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body.office-layout .planner-toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

body.office-layout .planner-toast {
  min-width: min(360px, calc(100vw - 48px));
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(219, 228, 240, 0.95);
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

body.office-layout .planner-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.office-layout .planner-toast.success {
  background: linear-gradient(180deg, #ffffff 0%, var(--success-soft) 100%);
}

body.office-layout .planner-toast.error {
  background: linear-gradient(180deg, #ffffff 0%, var(--danger-soft) 100%);
}

body.office-layout .planner-slot-candidate .status-pill {
  white-space: normal;
  line-height: 1.35;
}

body.office-layout .planner-slot-candidate .planner-selection-meta {
  line-height: 1.5;
}

@media (max-width: 1100px) {
  body.office-layout .planner-shell {
    grid-template-columns: 1fr;
  }
}

body.instructor-layout .availability-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 920px) {
body.student-layout .student-shell {
grid-template-columns: 1fr;
}

body.student-layout .sidebar {
display: none;
}

body.student-layout .content {
padding: 18px 14px 28px;
}

body.student-layout .topbar {
flex-direction: column;
            align-items: stretch;
            gap: 14px;
}

body.student-layout .topbar-tools {
width: 100%;
            align-items: stretch;
            gap: 10px;
}

body.student-layout .topbar-logout-form,
body.student-layout .topbar-tools .button {
width: 100%;
}

body.student-layout .topbar-logout-form .button {
justify-content: center;
}

body.student-layout .mobile-student-nav {
display: grid;
            grid-auto-flow: column;
            grid-auto-columns: max-content;
            gap: 10px;
            margin-bottom: 18px;
            padding: 2px 2px 8px;
            overflow-x: auto;
            overscroll-behavior-x: contain;
            scrollbar-width: none;
}

body.student-layout .mobile-student-nav::-webkit-scrollbar {
display: none;
}

body.student-layout .mobile-student-nav .sidebar-link {
justify-content: center;
            padding: 11px 14px;
            border-radius: 999px;
            border: 1px solid rgba(219, 228, 240, 0.92);
            background: rgba(255, 255, 255, 0.92);
            white-space: nowrap;
}

body.student-layout .hero-card,
body.student-layout .panel,
body.student-layout .table-card,
body.student-layout .meta-card,
body.student-layout .metric-card,
body.student-layout .availability-day-card,
body.student-layout .schedule-slot {
padding-left: 16px;
            padding-right: 16px;
}

body.student-layout .hero-card h2,
body.student-layout .panel-title {
font-size: clamp(24px, 7vw, 32px);
}

body.student-layout .metric-value-secondary,
body.student-layout .schedule-slot-line strong,
body.student-layout .meta-row strong {
overflow-wrap: anywhere;
}

body.student-layout .metric-value,
body.student-layout .meta-row,
body.student-layout .meta-row span,
body.student-layout .meta-row strong {
min-width: 0;
            overflow-wrap: anywhere;
            word-break: break-word;
}

body.student-layout .table-scroll {
margin-top: 18px;
            margin-left: -16px;
            margin-right: -16px;
            padding-left: 16px;
            padding-right: 16px;
}

body.student-layout .table-scroll table {
min-width: 640px;
            margin-top: 0;
}

body.student-layout .summary-grid,
body.student-layout .kpi-grid,
body.student-layout .availability-time-row {
grid-template-columns: minmax(0, 1fr);
}

body.student-layout .hours-history-entry-head,
body.instructor-layout .hours-history-entry-head {
flex-direction: column;
                align-items: stretch;
}

body.student-layout .hours-history-entry-badges,
body.instructor-layout .hours-history-entry-badges {
justify-content: flex-start;
}
}

/* Instructor Layout */
body.instructor-layout {
color: var(--ink);
            background:
                radial-gradient(circle at top left, rgba(15, 98, 254, 0.08), transparent 24%),
                linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
            overflow-x: hidden;
}

body.instructor-layout a {
color: inherit; text-decoration: none;
}

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

body.instructor-layout .content {
min-width: 0;
}

body.instructor-layout .sidebar {
min-height: 100vh;
            padding: 28px 22px;
            border-right: 1px solid rgba(219, 228, 240, 0.9);
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(18px);
            display: grid;
            align-content: space-between;
            gap: 28px;
}

body.instructor-layout .mobile-instructor-nav {
display: none;
}

body.office-layout .sidebar,
body.student-layout .sidebar,
body.instructor-layout .sidebar,
body.auth-layout .app-sidebar {
padding: 28px 22px;
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(18px);
}

body.office-layout .sidebar-brand,
body.student-layout .sidebar-brand,
body.student-layout .sidebar-copy,
body.instructor-layout .sidebar-brand,
body.instructor-layout .sidebar-copy,
body.auth-layout .sidebar-brand,
body.auth-layout .sidebar-copy {
display: grid;
            gap: 8px;
}

body.office-layout .sidebar-brand strong,
body.student-layout .sidebar-brand strong,
body.instructor-layout .sidebar-brand strong,
body.auth-layout .sidebar-brand strong {
font-size: 22px;
            letter-spacing: -0.03em;
}

body.office-layout .sidebar-brand span,
body.office-layout .nav-meta,
body.office-layout .eyebrow,
body.office-layout .muted,
body.office-layout .table-subtle,
body.office-layout .metric-label,
body.office-layout .metric-meta,
body.office-layout .kicker,
body.student-layout .sidebar-brand span,
body.student-layout .muted,
body.student-layout .eyebrow,
body.student-layout .sidebar-copy p,
body.student-layout .meta-note,
body.instructor-layout .sidebar-brand span,
body.instructor-layout .eyebrow,
body.instructor-layout .muted,
body.instructor-layout .sidebar-copy p,
body.instructor-layout .meta-note,
body.auth-layout .muted,
body.auth-layout .eyebrow,
body.auth-layout .sidebar-copy p,
body.auth-layout .info-card p,
body.auth-layout .field-hint {
color: var(--muted);
}

body.student-layout .sidebar-copy h1,
body.instructor-layout .sidebar-copy h1,
body.auth-layout .sidebar-copy h1 {
margin: 0;
            font-size: clamp(28px, 3vw, 34px);
            line-height: 1.02;
            letter-spacing: -0.05em;
}

body.office-layout .eyebrow,
body.student-layout .eyebrow,
body.instructor-layout .eyebrow,
body.auth-layout .eyebrow {
font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
}

body.office-layout .sidebar-nav,
body.office-layout .sidebar-actions,
body.student-layout .sidebar-nav,
body.instructor-layout .sidebar-nav,
body.auth-layout .sidebar-nav {
display: grid;
            gap: 8px;
}

body.office-layout .sidebar-link,
body.office-layout .sidebar-action,
body.student-layout .sidebar-link,
body.instructor-layout .sidebar-link,
body.auth-layout .sidebar-nav a {
display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 9px 12px;
            border-radius: 14px;
            border: 1px solid transparent;
            background: transparent;
            text-decoration: none;
            color: var(--ink);
            font-size: 15px;
            font-weight: 600;
            transition: 120ms ease;
}

body.office-layout .sidebar-link:hover,
body.office-layout .sidebar-action:hover,
body.student-layout .sidebar-link:hover,
body.instructor-layout .sidebar-link:hover,
body.auth-layout .sidebar-nav a:hover {
background: rgba(15, 98, 254, 0.04);
            border-color: rgba(15, 98, 254, 0.1);
            transform: translateX(1px);
}

body.office-layout .sidebar-link.active,
body.student-layout .sidebar-link.active,
body.instructor-layout .sidebar-link.active {
background: linear-gradient(180deg, var(--brand-soft), #ffffff);
            border-color: rgba(15, 98, 254, 0.16);
            color: var(--brand-dark);
            font-weight: 700;
}

body.auth-layout .sidebar-nav {
margin-top: 6px;
            justify-items: stretch;
            align-content: start;
            grid-auto-rows: min-content;
}

body.auth-layout .sidebar-nav > * {
width: 100%;
            max-width: 100%;
}

body.auth-layout .sidebar-nav a {
display: flex;
            justify-content: flex-start;
            align-items: center;
            min-height: 36px;
            padding: 4px 10px;
            width: 100%;
            line-height: 1.2;
            border-radius: 12px;
            border-color: rgba(219, 228, 240, 0.95);
            background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
            box-shadow: var(--shadow-soft);
}

body.student-layout .sidebar-card,
body.instructor-layout .sidebar-card,
body.auth-layout .info-card {
padding: 18px;
            border-radius: 20px;
            background: linear-gradient(180deg, #ffffff 0%, var(--panel-muted) 100%);
            border: 1px solid var(--line);
}

body.student-layout .sidebar-card strong,
body.instructor-layout .sidebar-card strong,
body.auth-layout .info-card strong {
display: block;
            margin-bottom: 8px;
            font-size: 15px;
}

body.student-layout .sidebar-card p,
body.instructor-layout .sidebar-card p,
body.auth-layout .info-card p {
margin: 0;
            line-height: 1.55;
}

body.instructor-layout .content {
padding: 28px;
}

body.instructor-layout .topbar {
display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px;
}

body.instructor-layout .topbar h1,
body.instructor-layout .topbar h1 {
margin: 6px 0 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.02; letter-spacing: -0.05em;
}

body.instructor-layout .topbar-tools,
body.instructor-layout .form-actions {
display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

body.instructor-layout .topbar-logout-form {
display: flex;
}

body.instructor-layout .chip {
display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--muted);
}

body.instructor-layout .chip strong {
color: var(--ink); font-size: 13px;
}

body.instructor-layout .topbar-tools form {
margin: 0;
}

body.instructor-layout .hero-card,
body.instructor-layout .metric-card,
body.instructor-layout .meta-card,
body.instructor-layout .table-card {
background: var(--panel); border: 1px solid rgba(219, 228, 240, 0.95); border-radius: 24px; box-shadow: var(--shadow);
            min-width: 0;
}

body.instructor-layout .hero-card,
body.instructor-layout .table-card {
padding: 22px;
}

body.instructor-layout .hero-card h2 {
margin: 8px 0; font-size: 26px; letter-spacing: -0.04em;
}

body.instructor-layout .hero-card p {
margin: 0; line-height: 1.65; color: var(--muted);
}

body.instructor-layout .stack {
display: grid; gap: 20px;
}

body.instructor-layout .kpi-grid,
body.instructor-layout .summary-grid {
display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.instructor-layout .metric-card,
body.instructor-layout .meta-card {
padding: 20px;
}

body.instructor-layout .metric-card strong {
display: block; color: var(--muted); font-size: 13px;
}

body.instructor-layout .metric-value {
display: block; margin-top: 10px; font-size: clamp(22px, 3vw, 28px); line-height: 1; letter-spacing: -0.05em;
}

body.instructor-layout .metric-card.info {
background: linear-gradient(180deg, #ffffff 0%, var(--brand-soft) 100%);
}

body.instructor-layout .metric-card.success {
background: linear-gradient(180deg, #ffffff 0%, var(--success-soft) 100%);
}

body.instructor-layout .metric-card.warning {
background: linear-gradient(180deg, #ffffff 0%, var(--warning-soft) 100%);
}

body.instructor-layout .meta-card h3 {
margin: 0 0 14px; font-size: 18px;
}

body.instructor-layout .meta-row {
display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid rgba(219, 228, 240, 0.72); margin-bottom: 12px;
}

body.instructor-layout .meta-row:last-child {
margin-bottom: 0; padding-bottom: 0; border-bottom: none;
}

body.instructor-layout .status-pill {
display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 700;
}

body.instructor-layout .status-pill.success {
background: var(--success-soft); color: #116149; border-color: rgba(15, 159, 110, 0.16);
}

body.instructor-layout .status-pill.info {
background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(15, 98, 254, 0.16);
}

body.instructor-layout .status-pill.warning {
background: var(--warning-soft); color: #9a3412; border-color: rgba(180, 83, 9, 0.14);
}

body.instructor-layout .button {
display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 11px 16px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; background: #fff; color: var(--ink); cursor: pointer;
}

body.instructor-layout .button.primary {
background: linear-gradient(180deg, #1d6dff 0%, var(--brand) 100%); color: white; border-color: rgba(15, 98, 254, 0.24);
}

body.instructor-layout .button.secondary {
background: transparent; border-color: var(--brand-dark); color: var(--brand-dark); box-shadow: none;
}

body.instructor-layout .button.secondary:hover {
background: rgba(34, 53, 78, 0.06);
}

body.instructor-layout .topbar-tools .button {
min-height: auto; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: none; white-space: nowrap;
}

body.instructor-layout .topbar-tools .button.secondary {
background: var(--brand-soft); border-color: rgba(15, 98, 254, 0.18); color: var(--brand-dark);
}

body.instructor-layout .topbar-tools .button.secondary:hover {
background: var(--brand); border-color: rgba(15, 98, 254, 0.28); color: #fff;
}

body.instructor-layout table {
width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 18px;
}

body.instructor-layout th {
padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
}

body.instructor-layout td {
padding: 16px 14px; border-bottom: 1px solid rgba(219, 228, 240, 0.72); vertical-align: top;
}

body.instructor-layout .alert {
margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(15, 159, 110, 0.18); background: var(--success-soft); color: #116149;
}

@media (max-width: 920px) {
body.instructor-layout .instructor-shell {
grid-template-columns: 1fr;
}

body.instructor-layout .sidebar {
display: none;
}

body.instructor-layout .content {
padding: 18px 14px 28px;
}

body.instructor-layout .topbar {
flex-direction: column;
            align-items: stretch;
            gap: 14px;
}

body.instructor-layout .topbar-tools {
width: 100%;
            align-items: stretch;
            gap: 10px;
}

body.instructor-layout .topbar-logout-form,
body.instructor-layout .topbar-tools .button {
width: 100%;
}

body.instructor-layout .topbar-logout-form .button {
justify-content: center;
}

body.instructor-layout .mobile-instructor-nav {
display: grid;
            grid-auto-flow: column;
            grid-auto-columns: max-content;
            gap: 10px;
            margin-bottom: 18px;
            padding: 2px 2px 8px;
            overflow-x: auto;
            overscroll-behavior-x: contain;
            scrollbar-width: none;
}

body.instructor-layout .mobile-instructor-nav::-webkit-scrollbar {
display: none;
}

body.instructor-layout .mobile-instructor-nav .sidebar-link {
justify-content: center;
            padding: 11px 14px;
            border-radius: 999px;
            border: 1px solid rgba(219, 228, 240, 0.92);
            background: rgba(255, 255, 255, 0.92);
            white-space: nowrap;
}

body.instructor-layout .hero-card,
body.instructor-layout .panel,
body.instructor-layout .table-card,
body.instructor-layout .meta-card,
body.instructor-layout .metric-card,
body.instructor-layout .availability-day-card,
body.instructor-layout .schedule-slot {
padding-left: 16px;
            padding-right: 16px;
}

body.instructor-layout .hero-card h2,
body.instructor-layout .panel-title {
font-size: clamp(24px, 7vw, 32px);
}

body.instructor-layout .metric-value-secondary,
body.instructor-layout .schedule-slot-line strong,
body.instructor-layout .meta-row strong {
overflow-wrap: anywhere;
}

body.instructor-layout .metric-value,
body.instructor-layout .meta-row,
body.instructor-layout .meta-row span,
body.instructor-layout .meta-row strong {
min-width: 0;
            overflow-wrap: anywhere;
            word-break: break-word;
}

body.instructor-layout .table-scroll {
margin-top: 18px;
            margin-left: -16px;
            margin-right: -16px;
            padding-left: 16px;
            padding-right: 16px;
}

body.instructor-layout .table-scroll table {
min-width: 640px;
            margin-top: 0;
}

body.instructor-layout .summary-grid,
body.instructor-layout .kpi-grid,
body.instructor-layout .availability-time-row {
grid-template-columns: minmax(0, 1fr);
}
}

body.office-layout .topbar-tools-mobile,
body.student-layout .topbar-tools-mobile,
body.instructor-layout .topbar-tools-mobile {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}

body.office-layout .topbar-primary-group,
body.office-layout .topbar-secondary-group,
body.student-layout .topbar-primary-group,
body.instructor-layout .topbar-primary-group {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
min-width: 0;
}

body.office-layout .topbar-logout-form,
body.student-layout .topbar-logout-form,
body.instructor-layout .topbar-logout-form {
display: flex;
margin: 0;
}

body.office-layout .topbar-chip,
body.student-layout .topbar-chip,
body.instructor-layout .topbar-chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 12px;
border-radius: 999px;
border: 1px solid var(--line);
background: #fff;
font-size: 13px;
font-weight: 600;
white-space: nowrap;
color: var(--muted);
min-width: 0;
}

body.office-layout .topbar-chip strong,
body.student-layout .topbar-chip strong,
body.instructor-layout .topbar-chip strong {
color: var(--ink);
font-size: 13px;
}

@media (max-width: 920px) {
body.office-layout .topbar-tools-mobile,
body.student-layout .topbar-tools-mobile,
body.instructor-layout .topbar-tools-mobile {
display: grid;
gap: 10px;
width: 100%;
align-items: stretch;
grid-template-columns: minmax(0, 1fr);
justify-content: stretch;
}

body.office-layout .topbar-primary-group,
body.office-layout .topbar-secondary-group,
body.student-layout .topbar-primary-group,
body.instructor-layout .topbar-primary-group {
display: grid;
gap: 10px;
width: 100%;
grid-template-columns: minmax(0, 1fr);
justify-content: stretch;
}

body.office-layout .topbar-chip,
body.student-layout .topbar-chip,
body.instructor-layout .topbar-chip {
display: flex;
width: 100%;
max-width: none;
justify-content: flex-start;
border-radius: 16px;
padding: 10px 12px;
white-space: normal;
overflow-wrap: anywhere;
}

body.office-layout .topbar-logout-form,
body.student-layout .topbar-logout-form,
body.instructor-layout .topbar-logout-form {
width: 100%;
}

body.office-layout .topbar-logout-form .button,
body.student-layout .topbar-logout-form .button,
body.instructor-layout .topbar-logout-form .button {
width: 100%;
justify-content: center;
}
}

/* Celujemy w mobile */
@media (max-width: 768px) {
    /* 1. Resetujemy model pudełkowy dla wszystkiego w formularzu */
    .availability-form, 
    .availability-field, 
    .availability-form input, 
    .availability-form textarea {
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    /* 2. Naprawiamy wystawanie w prawo */
    .availability-field {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 15px !important;
    }

    .availability-form input, 
    .availability-form textarea {
        width: 100% !important;
        /* Usuwa systemowe cienie i dziwne wymiary z iOS */
        -webkit-appearance: none;
        appearance: none;
    }

    /* 3. Naprawa rzędu Od/Do */
    .availability-time-row {
        display: flex !important;
        flex-direction: column !important; /* Na mobile jeden pod drugim to zbawienie UX */
        gap: 10px !important;
    }
	
	/* Ikona kalendarza dla pola daty */
.availability-form input[type="date"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d=' bombers 8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

/* Ikona zegara dla pól czasu */
.availability-form input[type="time"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.availability-form input:disabled, 
.availability-form textarea:disabled {
    background-color: #f3f4f6 !important; /* Jasnoszary */
    color: #9ca3af !important;           /* Szary tekst */
    cursor: not-allowed;
    border-color: #e5e7eb !important;
    opacity: 1; /* iPhone domyślnie daje bardzo niskie opacity, tutaj je prostujemy */
}
body.student-layout .button {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

}
body.student-layout .availability-empty {
    margin: 0 0 20px 0;
    padding: 15px;
    background-color: #fff4f4; /* Bardzo jasny czerwony/różowy */
    border-left: 4px solid #f87171; /* Czerwony pasek z boku */
    color: #991b1b; /* Ciemnoczerwony tekst */
    font-size: 0.95rem;
    line-height: 1.5;
    border-radius: 4px;
}