:root {
    --bg: #FAF9F7;
    --surface: #ffffff;
    --card: #ffffff;
    --sidebar: #ffffff;
    --sidebar-accent: #D18B70;
    --sidebar-glow: rgba(209, 139, 112, 0.12);
    --sidebar-text: #473831;
    --sidebar-muted: #473831;
    --text: #473831;
    --muted: #6B5B54;
    --line: #E8E0DB;
    --primary: #D18B70;
    --primary-dark: #B87560;
    --success: #2E7D32;
    --danger: #C62828;
    --shadow: none;
    --shell-shadow: none;
    --font-heading: "Signika", sans-serif;
    --font-body: "Poppins", sans-serif;
    --font-h1: "Poppins", sans-serif;
    --font-h2: "Poppins", sans-serif;
    --font-h3: "Poppins", sans-serif;
    --font-h4: "Poppins", sans-serif;
    --font-h5: "Poppins", sans-serif;
    --font-h6: "Poppins", sans-serif;
    --font-p: "Poppins", sans-serif;
    --font-menu-main: "Poppins", sans-serif;
    --font-menu-sub: "Poppins", sans-serif;
    --font-page: "Poppins", sans-serif;
    --font-card: "Poppins", sans-serif;
    --font-form: "Poppins", sans-serif;
    --font-button: "Poppins", sans-serif;
    --font-devanagari: "Halant", "Noto Sans Devanagari", "Noto Sans", sans-serif;
    --body-bg-start: #FAF9F7;
    --body-bg-end: #FAF9F7;
    --app-accent-stripe: #D18B70;
    --app-frame-border: #E8E0DB;
    --card-bg: #ffffff;
    --card-text: #473831;
    --form-bg: #ffffff;
    --form-text: #473831;
    --button-bg: #D18B70;
    --button-text: #ffffff;
    --button-primary-bg: #D18B70;
    --button-primary-text: #ffffff;
    --button-primary-hover: #B87560;
    --button-secondary-bg: #F5EDE8;
    --button-secondary-text: #473831;
    --button-secondary-hover: #EBDDD6;
    --button-danger-bg: #C62828;
    --button-danger-text: #ffffff;
    --button-danger-hover: #A51C1C;
    --shadow-card: none;
    --shadow-section: none;
    --shadow-button: none;
    --shadow-button-primary: none;
    --shadow-button-secondary: none;
    --shadow-button-danger: none;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 0.8rem; line-height: 1.5; }
body.modal-open {
    overflow: hidden;
}
body.app-body,
body.auth-body {
    -webkit-user-select: none;
    user-select: none;
}
input,
textarea,
select,
button,
[contenteditable="true"],
.allow-text-select {
    -webkit-user-select: text;
    user-select: text;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p { margin-top: 0; color: var(--text); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.3; }
h4, h5, h6 { font-family: var(--font-heading); font-weight: 400; line-height: 1.4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 0.925rem; font-weight: 400; }
h5 { font-size: 0.875rem; font-weight: 400; }
h6 { font-size: 0.85rem; font-weight: 400; }
p { font-size: 0.8rem; font-weight: 400; line-height: 1.6; }
li, td, th, label, input, select, textarea, button { font-family: var(--font-body); font-size: 0.8rem; }
input, select, textarea, button { font: inherit; }
.font-devanagari,
:lang(hi),
:lang(sa),
:lang(mr),
:lang(ne),
:lang(kok) {
    font-family: var(--font-devanagari);
}
.font-devanagari,
.font-devanagari * {
    font-family: var(--font-devanagari) !important;
}
.font-nunito {
    font-family: var(--font-body) !important;
}
input, select, textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--form-bg);
    color: var(--form-text);
    font-family: var(--font-form);
    font-size: 0.8rem;
}
input[type="number"] {
    text-align: right;
}
input[type="date"],
input[type="time"],
input[type="month"] {
    min-height: 52px;
    padding-right: 2.9rem;
    background-color: #fffdfc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23cf8a6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3' ry='3'/%3E%3Cline x1='16' y1='2.5' x2='16' y2='6'/%3E%3Cline x1='8' y1='2.5' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    background-size: 1.05rem;
    border-color: var(--line);
    color-scheme: light;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input[type="date"]:focus,
input[type="time"]:focus,
input[type="month"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(207, 138, 107, 0.14);
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    opacity: 0.01;
    width: 2.4rem;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit {
    color: var(--text);
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="month"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus,
input[type="month"]::-webkit-datetime-edit-month-field:focus,
input[type="month"]::-webkit-datetime-edit-year-field:focus,
input[type="time"]::-webkit-datetime-edit-minute-field:focus {
    background: rgba(207, 138, 107, 0.16);
    border-radius: 6px;
}
.date-picker-ready:hover {
    border-color: rgba(207, 138, 107, 0.58);
    background-color: #fffaf7;
}
.date-picker-ready:active {
    background-color: #fff5ee;
}
textarea { min-height: 110px; resize: vertical; }
label > span { display: block; margin-bottom: 0.35rem; font-size: 0.8rem; color: var(--muted); }
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(157, 91, 66, 0.28);
    outline-offset: 2px;
}

.app-body {
    min-height: 100vh;
    padding: 10px;
    background: var(--bg);
}
.app-shell {
    min-height: calc(100vh - 20px);
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--app-frame-border);
    border-radius: 16px;
    background: var(--bg);
}
.menu-toggle,
.sidebar-overlay { display: none; }
.menu-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 45;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 18px;
    background: var(--primary);
    box-shadow: var(--shadow);
    padding: 0.9rem;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    margin: 5px 0;
    border-radius: 999px;
    background: #fff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.shell-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
}
.shell-topbar-admin {
    background: #ffffff;
    border-color: var(--line);
}
.shell-topbar-admin .shell-kicker,
.shell-topbar-admin .shell-title,
.shell-topbar-admin .user-pill,
.shell-topbar-admin .user-pill small {
    color: var(--text);
}
.shell-topbar-admin .user-pill {
    border-color: var(--line);
    background: transparent;
}
.shell-topbar-admin .topbar-language-select {
    border-color: var(--line);
    background-color: transparent;
    color: var(--text);
}
.shell-topbar-brand-logo {
    width: 500px;
    max-width: 100%;
    height: 66px;
    object-fit: contain;
    display: block;
}
.shell-topbar-brand,
.shell-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}
.shell-topbar-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
}
.topbar-language-form {
    display: flex;
    align-items: center;
    margin: 0;
}
.topbar-language-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--line);
    background: #fcfbfa;
    color: var(--text);
    border-radius: 999px;
    padding: 0.5rem 2rem 0.5rem 0.8rem;
    font-size: 0.9rem;
    line-height: 1.1;
    min-width: 120px;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}
.topbar-language-select:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary) 68%, #fff 32%);
    outline-offset: 2px;
}
.shell-topbar-actions .inline-form {
    width: auto;
    min-width: 0;
    margin: 0;
}
.shell-topbar-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.shell-kicker,
.sidebar-kicker,
.sidebar-footer-label {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: var(--muted);
}
.shell-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.1;
}
.shell-logout {
    min-height: 38px;
    padding-inline: 1rem;
    background: var(--primary-dark);
}
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fcfbfa;
    white-space: nowrap;
}
.user-pill small {
    display: inline-block;
    color: var(--muted);
    font-size: 0.8rem;
}
.workspace-shell {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    align-items: start;
    min-width: 0;
}
.sidebar {
    background: #ffffff;
    color: var(--text);
    padding: 1.1rem 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: sticky;
    top: 0;
    height: auto;
    min-height: 0;
    overflow-y: visible;
    border-radius: 14px;
    border: 1px solid var(--line);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 0 0.95rem 0.05rem;
}
.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
}
.nav-menu { display: grid; gap: 0.35rem; margin-top: 0; font-size: 1rem; }
.nav-section {
    display: grid;
    gap: 0.2rem;
}
.nav-parent-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: stretch;
    border-radius: 16px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-parent,
.nav-submenu a {
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-menu-main);
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.nav-parent {
    font-size: 0.925rem;
    font-weight: 400;
}
.nav-submenu a {
    font-size: 0.875rem;
    font-weight: 400;
}
.nav-label { min-width: 0; }
.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-parent-toggle {
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    min-width: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.nav-section-collapsible .nav-parent,
.nav-section-collapsible .nav-parent-toggle {
    background: transparent;
}
.nav-parent-toggle span {
    width: 0.7rem;
    height: 0.7rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.nav-section-collapsible.is-open .nav-parent-row,
.nav-section-collapsible .nav-parent-row:hover {
    background: var(--primary);
    color: #fff;
}
.nav-section-collapsible.is-open .nav-parent,
.nav-section-collapsible.is-open .nav-parent-toggle,
.nav-section-collapsible .nav-parent-row:hover .nav-parent,
.nav-section-collapsible .nav-parent-row:hover .nav-parent-toggle {
    color: #fff;
}
.nav-parent.active,
.nav-parent:hover,
.nav-parent-toggle.active,
.nav-parent-toggle:hover,
.nav-submenu a.active,
.nav-submenu a:hover {
    background: var(--primary);
    color: #fff;
}
.nav-section-collapsible .nav-parent.active,
.nav-section-collapsible .nav-parent:hover,
.nav-section-collapsible .nav-parent-toggle.active,
.nav-section-collapsible .nav-parent-toggle:hover {
    background: transparent;
    color: inherit;
}
.nav-section.is-open .nav-parent-toggle span {
    transform: rotate(225deg);
}
.nav-submenu {
    display: grid;
    gap: 0.15rem;
    padding-left: 0.9rem;
}
.nav-submenu[hidden] {
    display: none !important;
}
.nav-submenu a {
    padding: 0.45rem 0.8rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-menu-sub);
    color: var(--text);
}
.nav-submenu .nav-icon {
    width: 1.05rem;
    height: 1.05rem;
    opacity: 0.9;
}
.nav-submenu a.active,
.nav-submenu a:hover {
    background: rgba(209, 139, 112, 0.15);
    color: var(--primary-dark);
}
.sidebar-footer {
    color: var(--muted);
    font-size: 0.8rem;
    padding: 0.8rem 0.5rem 0.4rem;
    margin-top: auto;
}
.sidebar-footer-label { color: var(--muted); margin-bottom: 0.35rem; }

.main-panel {
    min-width: 0;
    max-width: 100%;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    font-family: var(--font-page);
    font-size: 0.8rem;
}
.topbar {
    margin-bottom: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}
.topbar h1 {
    margin-bottom: 0.35rem;
    font-size: 1.5rem;
    font-weight: 600;
}
.topbar p { color: var(--muted); margin-bottom: 0; font-size: 0.8rem; }
.content {
    display: grid;
    gap: 1rem;
    padding: 0.2rem 0;
}

.panel, .stat-card, .auth-card, .invoice-sheet {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font-card);
    font-size: 0.8rem;
}
.panel, .invoice-sheet { padding: 1.1rem; }
.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 1rem;
}
.panel-grid > *,
.stats-grid > *,
.settings-split-grid > *,
.content > * {
    min-width: 0;
    max-width: 100%;
}
.course-payment-plans-panel {
    grid-column: 1 / -1;
}
.stat-card { padding: 1rem; background: #ffffff; }
.stat-card span { color: var(--muted); display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.8rem; }
.stat-card strong { font-size: 1.5rem; margin-bottom: 0.25rem; display: block; }
.stat-card strong { font-family: var(--font-heading); }
.stat-card small { color: var(--muted); font-size: 0.8rem; }

.hero-panel {
    display: grid;
    gap: 0.8rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}
.hero-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}
.hero-panel p {
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0;
}
.hero-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(244, 239, 236, 0.94);
    color: var(--text);
    max-width: 100%;
    overflow-wrap: anywhere;
}
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.35rem 0 0.3rem;
    color: var(--muted);
    font-size: 0.92rem;
}
.breadcrumbs a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 0.14em;
}
.breadcrumbs-current {
    color: var(--text);
    font-weight: 700;
}
.breadcrumbs-separator {
    color: var(--muted);
}
.dashboard-filter-bar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.dashboard-filter-bar label {
    min-width: 220px;
}
.required-marker {
    display: inline;
    margin: 0;
    color: var(--primary-dark);
    font-weight: 700;
}
.is-required > span:first-child::after {
    content: " *";
    color: var(--primary-dark);
    font-weight: 700;
}
.field-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}
.field-hint-inline {
    margin-top: 0.35rem;
}
.field-error {
    display: block;
    margin-top: 0.35rem;
    color: var(--danger);
    font-size: 0.86rem;
    line-height: 1.4;
}
.field-invalid,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(185, 63, 63, 0.12);
}
.recipient-search {
    margin: 0.45rem 0 0.55rem;
}
.preview-panel {
    display: grid;
    gap: 0.55rem;
}
.preview-surface {
    min-height: 140px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    overflow-wrap: anywhere;
}
.preview-surface-plain {
    white-space: pre-wrap;
}
.richtext-toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.wp-wysiwyg-shell {
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
.wp-wysiwyg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem 0;
    background: #fff;
}
.wp-wysiwyg-tabs {
    display: inline-flex;
    align-items: flex-end;
    margin-left: auto;
}
.wp-wysiwyg-tab {
    border: 1px solid #ccd0d4;
    border-bottom: 0;
    background: #f6f7f7;
    color: #2c3338;
    padding: 0.4rem 0.8rem;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.92rem;
}
.wp-wysiwyg-tab + .wp-wysiwyg-tab {
    margin-left: 0.2rem;
}
.wp-wysiwyg-tab.is-active {
    background: #fff;
    position: relative;
    top: 1px;
}
.wp-wysiwyg-toolbar {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border-top: 1px solid #ccd0d4;
    border-bottom: 1px solid #ccd0d4;
    background: #f6f7f7;
}
.wp-wysiwyg-toolbar select,
.wp-wysiwyg-toolbar .btn {
    border-radius: 4px;
}
.wp-wysiwyg-toolbar .btn {
    min-height: 32px;
    padding: 0.35rem 0.65rem;
    border-color: #c3c4c7;
    background: #fff;
    color: #2c3338;
    box-shadow: none;
}
.wp-wysiwyg-toolbar .btn:hover {
    border-color: #8c8f94;
    background: #f6f7f7;
}
.wp-wysiwyg-editor-shell {
    border: 0;
    border-radius: 0;
    background: #fff;
}
.wysiwyg-shell {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffdfc;
    overflow: hidden;
}
.wysiwyg-editor {
    min-height: 320px;
    padding: 1rem 1.05rem;
    outline: none;
    line-height: 1.6;
    color: var(--text);
    background: #fff;
}
.wysiwyg-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(34, 113, 177, 0.12);
}
.wysiwyg-editor:empty::before {
    content: "Start writing the lesson content here...";
    color: var(--muted);
}
.wp-wysiwyg-shell textarea[data-wysiwyg-textarea] {
    border: 0;
    border-top: 0;
    border-radius: 0;
    min-height: 320px;
    padding: 1rem 1.05rem;
    background: #fff;
    resize: vertical;
    box-shadow: none;
}
.wp-wysiwyg-shell .wysiwyg-shell.wp-wysiwyg-editor-shell {
    border: 0;
    border-radius: 0;
    background: #fff;
}
.wysiwyg-editor h2,
.wysiwyg-editor h3,
.wysiwyg-editor h4,
.wysiwyg-editor p {
    margin-bottom: 0.9rem;
}
.wysiwyg-editor ul,
.wysiwyg-editor ol {
    padding-left: 1.4rem;
    margin: 0 0 0.9rem;
}
.wysiwyg-editor a {
    color: var(--primary-dark);
    text-decoration: underline;
}
.wysiwyg-editor img {
    max-width: 100%;
    height: auto;
}
.communication-form-column {
    display: grid;
    gap: 1rem;
    align-content: start;
    min-width: 0;
}
.communication-recipient-column {
    align-content: start;
}
.communication-wide-panel {
    width: 100%;
    max-width: 100%;
}
.token-toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
}
.token-toolbar-label {
    font-weight: 600;
    color: var(--muted);
    margin-right: 0.25rem;
}
.lesson-rich-content {
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.lesson-rich-content::after {
    content: "";
    display: block;
    clear: both;
}
.lesson-rich-content img {
    max-width: min(360px, 100%);
    height: auto;
    border-radius: 12px;
    margin-bottom: 0.85rem;
}
.lesson-image-left {
    float: left;
    margin: 0.2rem 1rem 0.8rem 0;
}
.lesson-image-right {
    float: right;
    margin: 0.2rem 0 0.8rem 1rem;
}
.lesson-image-center {
    display: block;
    margin: 0.2rem auto 1rem;
    float: none;
}
.student-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.empty-inline {
    color: var(--muted);
}
.dashboard-customizer {
    display: grid;
    gap: 0.75rem;
}
.dashboard-layout-details {
    display: grid;
    gap: 1rem;
}
.dashboard-layout-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}
.dashboard-layout-summary::-webkit-details-marker {
    display: none;
}
.dashboard-layout-summary h3 {
    margin-bottom: 0.2rem;
}
.dashboard-layout-summary p {
    margin: 0;
}
.dashboard-layout-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.25rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(219, 135, 111, 0.14);
    color: var(--accent-dark);
    font-weight: 600;
}
.dashboard-layout-details[open] .dashboard-layout-toggle {
    background: rgba(80, 49, 40, 0.12);
}
.dashboard-layout-details[open] .dashboard-layout-toggle::after {
    content: "Collapse";
}
.dashboard-layout-details[open] .dashboard-layout-toggle {
    font-size: 0;
}
.dashboard-layout-details[open] .dashboard-layout-toggle::after {
    font-size: 0.95rem;
}
.dashboard-customizer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
}
.dashboard-customizer-row strong {
    display: block;
    margin-bottom: 0.2rem;
}
.dashboard-customizer-row small {
    color: var(--muted);
}
.dashboard-customizer-meta {
    min-width: 0;
}
.dashboard-customizer-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.revenue-graph-card {
    display: grid;
    gap: 1rem;
}
.revenue-graph {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 236, 231, 0.96) 100%);
    overflow: visible;
}
.revenue-grid-line {
    stroke: rgba(80, 49, 40, 0.12);
    stroke-width: 1;
}
.revenue-axis-label,
.revenue-bottom-label {
    fill: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.revenue-area-fill {
    fill: rgba(219, 135, 111, 0.18);
}
.revenue-line-stroke {
    fill: none;
    stroke: var(--primary-dark);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.revenue-point {
    fill: var(--primary);
    stroke: #fff;
    stroke-width: 3;
}
.revenue-legend-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 0.75rem;
}
.revenue-legend-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}
.revenue-legend-item strong {
    font-size: 0.9rem;
}
.revenue-legend-item span {
    color: var(--muted);
    font-size: 0.82rem;
}
.occupancy-list {
    display: grid;
    gap: 0.85rem;
}
.occupancy-card {
    display: grid;
    gap: 0.55rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.64);
}
.occupancy-header {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: baseline;
}
.occupancy-header span,
.occupancy-card small,
.occupancy-meta {
    color: var(--muted);
}
.occupancy-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.occupancy-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(207, 138, 107, 0.14);
    overflow: hidden;
}
.occupancy-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success) 0%, var(--primary) 100%);
}
.dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.panel-header h2,
.panel-header h3 {
    margin-bottom: 0.35rem;
}
.panel-header p {
    color: var(--muted);
    margin-bottom: 0;
}
.birthday-list {
    display: grid;
    gap: 0.85rem;
}
.birthday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.6);
}
.birthday-item > div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}
.birthday-item span {
    color: var(--muted);
    white-space: normal;
    overflow-wrap: anywhere;
}
.birthday-actions {
    position: relative;
}
.birthday-actions summary {
    list-style: none;
}
.birthday-actions summary::-webkit-details-marker {
    display: none;
}
.birthday-action-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: grid;
    gap: 0.5rem;
    min-width: 150px;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
    z-index: 5;
}
.birthday-action-menu .btn {
    width: 100%;
}

.toolbar, .detail-header, .invoice-head, .invoice-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.detail-header .schedule-actions {
    justify-content: flex-end;
}
.detail-header .schedule-actions form {
    margin: 0;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.95rem;
}
.toolbar { margin-bottom: 0; }
.inline-form { display: flex; gap: 0.6rem; width: min(420px, 100%); }
.inline-form input,
.inline-form select { flex: 1; }
.inline-form-compact { width: auto; min-width: min(320px, 100%); }
.inline-form-compact input { min-width: 180px; }
.inline-form-button {
    display: inline-flex;
    width: auto;
    min-width: 0;
    margin: 0;
}
.color-swatch {
    display: inline-block;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 4px;
    background: var(--swatch, #302018);
    border: 1px solid rgba(0, 0, 0, 0.12);
    vertical-align: middle;
    margin-right: 0.45rem;
}

.data-table {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.data-table th,
.data-table td {
    text-align: left;
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.data-table th { color: var(--text); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; background: #FFF9F6; }
.data-table th.table-sortable-col {
    cursor: pointer;
    user-select: none;
}
.data-table th.table-sortable-col:hover {
    color: var(--text);
}
.data-table th.table-sortable-active {
    color: var(--text);
}
.data-table th.table-sortable-asc::after,
.data-table th.table-sortable-desc::after {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.8em;
}
.data-table th.table-sortable-asc::after {
    content: '↑';
}
.data-table th.table-sortable-desc::after {
    content: '↓';
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #FFF9F6; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td,
.clickable-row:focus td { background: #FFF9F6; }
.clickable-row:focus {
    outline: 2px solid rgba(157, 91, 66, 0.22);
    outline-offset: -2px;
}
.attendance-matrix-panel { overflow-x: auto; }
.attendance-matrix { min-width: 980px; }
.attendance-matrix select { min-width: 120px; }
.tab-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.tab-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 0.7rem 1rem;
    cursor: pointer;
}
.tab-button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.settings-hub {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1rem;
}
.settings-tab-panels {
    display: grid;
    gap: 1rem;
}
.settings-page-content {
    display: grid;
    gap: 1rem;
}
.tab-nav-vertical {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    position: sticky;
    top: 1rem;
    height: fit-content;
}
.tab-nav-vertical .tab-button {
    justify-content: flex-start;
    text-align: left;
    border-radius: 10px;
}
.tab-nav-vertical .tab-button.active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.settings-submenu a.tab-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.installment-course-group + .installment-course-group { margin-top: 1.5rem; }
.payment-hint,
.plan-note {
    color: var(--muted);
    font-size: 0.92rem;
}
.plan-note {
    align-self: end;
    padding-bottom: 0.4rem;
}
.pagination { margin-top: 1rem; color: var(--muted); }
.simple-list { margin: 0; padding-left: 1.2rem; }

.form-grid { display: grid; gap: 1rem; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.teacher-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.preattendance-filter-form {
    align-items: end;
}
.preattendance-filter-form label {
    margin: 0;
}
.preattendance-filter-actions {
    min-height: 100%;
    align-items: center;
    justify-content: flex-start;
    padding-top: 1.6rem;
}
@media (max-width: 900px) {
    .preattendance-filter-form {
        grid-template-columns: 1fr;
    }
    .preattendance-filter-actions {
        padding-top: 0;
    }
}
@media (max-width: 1100px) {
    .teacher-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .teacher-form-grid {
        grid-template-columns: 1fr;
    }
}
.full { grid-column: 1 / -1; }
.group-enrollment-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 1rem;
    align-items: start;
}
.group-enrollment-main {
    display: grid;
    gap: 1rem;
}
.group-enrollment-sidebar {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.7);
    display: grid;
    gap: 0.75rem;
}
.group-enrollment-sidebar h4 {
    margin: 0;
}
.group-enrollment-student-list {
    min-height: 320px;
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    background: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: var(--font-button);
}
.btn:hover,
.btn:focus-visible {
    background: var(--button-secondary-hover);
}
.btn-primary {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
}
.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--button-primary-hover);
}
.btn-secondary {
    background: var(--button-secondary-bg);
    color: var(--button-secondary-text);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--button-secondary-hover);
}
.btn-danger {
    background: var(--button-danger-bg);
    color: var(--button-danger-text);
}
.btn-danger:hover,
.btn-danger:focus-visible {
    background: var(--button-danger-hover);
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-small {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
}
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
form .table-actions,
form .course-form-actions,
form .public-form-actions,
form .modal-actions {
    margin-top: 1rem;
}
.table-actions form {
    margin: 0;
}
.panel-accent-form {
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 86%, #ffffff 14%);
    box-shadow: var(--shadow-section);
}
.lms-hierarchy-table .lms-topic-row td {
    background: rgba(207, 138, 107, 0.1);
    vertical-align: top;
}
.lms-hierarchy-table .lms-child-row td {
    background: rgba(255, 255, 255, 0.68);
}
.lms-child-cell {
    padding-left: 2rem !important;
}
.lms-structure-title {
    font-weight: 700;
}
.lms-structure-description {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.92rem;
}
.lms-filter-bar {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.lms-filter-bar label {
    display: grid;
    gap: 0.3rem;
    min-width: 220px;
}
.lms-filter-bar label > span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}
.lms-autocomplete-wrap {
    position: relative;
}
.lms-autocomplete-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    max-height: 220px;
    overflow-y: auto;
}
.lms-autocomplete-list li {
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    font-size: 0.88rem;
}
.lms-autocomplete-list li:hover {
    background: var(--primary);
    color: #fff;
}
.stat-card-link {
    text-decoration: none;
    color: inherit;
}
.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(60, 37, 30, 0.08);
}
.capacity-mini-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}
.capacity-mini-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    background: rgba(255, 255, 255, 0.62);
}
.capacity-mini-card span {
    color: var(--muted);
    font-size: 0.82rem;
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 700;
}
.capacity-mini-card strong {
    font-size: 1.05rem;
    color: var(--text);
}
.course-tabs {
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.course-tab {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
    cursor: pointer;
}
.course-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.course-tab-panel {
    margin-top: 1rem;
}
.course-capacity-students {
    margin-top: 1rem;
}
.course-capacity-students h4 {
    margin-bottom: 0.65rem;
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
}
.alert-danger { background: rgba(185, 63, 63, 0.1); color: var(--danger); }
.alert-success { background: rgba(127, 143, 85, 0.14); color: var(--success); }

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top left, rgba(207, 138, 107, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(127, 143, 85, 0.14), transparent 32%),
        linear-gradient(140deg, #efe7e2 0%, #ddd6d2 52%, #d1c5bf 100%);
}
.auth-shell {
    width: min(1380px, 100%);
    display: grid;
    gap: 1rem;
}
.auth-login-body {
    display: block;
    padding: 0;
    background: #f0ecec;
}
.auth-login-body .auth-shell {
    width: 100%;
    min-height: 100vh;
    gap: 0;
}
.auth-login-body .auth-flash {
    position: fixed;
    top: 1rem;
    left: 50%;
    z-index: 20;
    width: min(540px, calc(100vw - 2rem));
    transform: translateX(-50%);
}
.auth-card { padding: 2.2rem; }
.auth-flash { margin-bottom: 0; }
.auth-page {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 430px);
    gap: 1.2rem;
    align-items: stretch;
}
.auth-brand-panel,
.auth-form-panel {
    border: 1px solid rgba(65, 47, 41, 0.08);
    border-radius: 30px;
    box-shadow: var(--shell-shadow);
}
.auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    background:
        radial-gradient(circle at 14% 18%, rgba(244, 232, 214, 0.94), transparent 34%),
        linear-gradient(145deg, #e6e0dc 0%, #dedad8 58%, #e9e3df 100%);
    color: var(--text);
}
.auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(233, 227, 223, 0) 0%, rgba(233, 227, 223, 0) 68%, rgba(233, 227, 223, 0.86) 100%),
        radial-gradient(circle at 20% 16%, rgba(244, 232, 214, 0.36), transparent 30%);
    pointer-events: none;
}
.auth-brand-visual {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0;
    justify-items: stretch;
    align-self: stretch;
    min-height: 100%;
}
.auth-brand-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    filter: none;
}
.auth-brand-visual-full,
.auth-brand-image-full {
    min-height: 100%;
}
.auth-illustration-panel {
    min-height: 760px;
}
.auth-form-panel {
    padding: 2.2rem;
    display: grid;
    gap: 1.15rem;
    align-content: start;
    background: rgba(248, 245, 243, 0.94);
    backdrop-filter: blur(16px);
}
.auth-panel-header h2 {
    margin-bottom: 0.45rem;
    font-size: clamp(1.6rem, 2vw, 2.2rem);
}
.auth-panel-header p {
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 0;
}
.auth-method-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.4rem;
    border-radius: 6px;
    background: rgba(65, 47, 41, 0.05);
    border: 1px solid rgba(65, 47, 41, 0.06);
}
.auth-method-tab {
    appearance: none;
    border: 0;
    padding: 0.72rem 1rem;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}
.auth-method-tab.active,
.auth-method-tab:hover {
    background: #fff;
    color: var(--text);
    box-shadow: 0 10px 22px rgba(55, 37, 30, 0.08);
}
.auth-tab-panel,
.auth-form-stack.auth-tab-panel {
    display: none;
}
.auth-tab-panel.active,
.auth-form-stack.auth-tab-panel.active {
    display: grid;
}
.auth-form-stack {
    display: grid;
    gap: 1rem;
}
.auth-form-stack label {
    display: grid;
    gap: 0.45rem;
    position: relative;
}
.auth-form-stack label > span {
    margin-bottom: 0;
    color: var(--text);
    font-weight: 700;
}
.auth-form-stack input {
    min-height: 54px;
    border-radius: 6px;
    border-color: rgba(65, 47, 41, 0.12);
    background: #fff;
}
.auth-submit,
.auth-secondary-submit {
    width: 100%;
    min-height: 54px;
    border-radius: 6px;
    justify-content: center;
    font-weight: 700;
}
.auth-secondary-submit {
    background: rgba(65, 47, 41, 0.08);
    color: var(--text);
}
.auth-secondary-submit:hover {
    background: rgba(65, 47, 41, 0.14);
}
.auth-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.2rem;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.95rem;
}
.auth-inline-links a:hover {
    color: var(--text);
}
.auth-divider {
    position: relative;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(65, 47, 41, 0.12);
}
.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 0.8rem;
    background: rgba(248, 245, 243, 0.94);
}
.auth-footer-meta {
    display: grid;
    gap: 0.3rem;
    padding-top: 0.45rem;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: center;
}
.auth-form-panel .field-error-inline {
    display: none;
}
.auth-form-panel .field-error-inside,
.auth-login-form-side .field-error-inside {
    position: absolute;
    right: 0.95rem;
    bottom: 0.95rem;
    margin-top: 0;
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(248, 245, 243, 0.98) 30%);
    padding-left: 0.7rem;
    pointer-events: none;
}
.auth-form-stack input.field-invalid {
    padding-right: 8.5rem;
}
.auth-login-stage {
    width: 100%;
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: 0;
}
.auth-login-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    min-height: 100vh;
    justify-self: stretch;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: hidden;
}
.auth-login-body .auth-login-card {
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
}
.auth-login-form-side {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(414px, 100%);
    margin: 5px;
    justify-self: center;
    align-content: center;
    gap: 1.2rem;
    min-height: 100vh;
    padding: 2.4rem 2.2rem;
    background: transparent;
}
.auth-login-body .auth-login-form-side {
    min-height: 100vh;
    padding: 2.4rem 2.2rem;
    background: transparent;
}
.auth-login-header {
    gap: 0.4rem;
}
.auth-login-header p {
    max-width: 28rem;
}
.auth-login-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.auth-login-tabs .auth-method-tab {
    justify-content: center;
    text-align: center;
}
.auth-login-visual-side {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        url("../images/LoginIllustration.png") center center / contain no-repeat;
}
.auth-login-footer {
    margin-top: auto;
}
.public-form-body {
    min-height: auto;
    display: block;
    padding: 0;
    background: transparent;
}
.public-form-shell {
    width: min(1080px, 100%);
}
.public-form-card {
    display: grid;
    gap: 1.1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}
.public-registration-form {
    display: grid;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
}
.public-form-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.15rem 1.65rem;
}
.public-form-grid > label {
    grid-column: span 3;
}
.public-third-field {
    grid-column: span 2;
}
.public-registration-form label {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}
.public-registration-form [hidden] {
    display: none !important;
}
.public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) {
    position: relative;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    column-gap: 1rem;
    row-gap: 0;
}
.public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) > span {
    grid-column: 1;
    display: block;
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}
.public-registration-form .field-error-inline {
    margin: 0;
    font-size: 0.76rem;
    color: var(--danger);
    line-height: 1.2;
    text-align: right;
}
.public-registration-form .field-error-inside {
    position: absolute;
    right: 0;
    bottom: 0.6rem;
    z-index: 1;
    font-size: 0.74rem;
    line-height: 1;
    color: var(--danger);
    pointer-events: none;
    background: transparent;
}
.public-registration-form input,
.public-registration-form select {
    min-height: 52px;
    padding: 0.8rem 0 0.55rem;
    border: 0;
    border-bottom: 1px solid rgba(80, 49, 40, 0.28);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.public-registration-form input[type="date"],
.public-registration-form input[type="month"] {
    padding-right: 2.4rem;
    background-position: right 0.15rem center;
    background-size: 1rem;
}
.public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) > input,
.public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) > select {
    grid-column: 2;
    padding-right: 5.5rem;
}
.public-registration-form input:focus,
.public-registration-form select:focus {
    border-bottom-color: rgba(219, 135, 111, 0.9);
    box-shadow: inset 0 -2px 0 rgba(219, 135, 111, 0.9);
}
.field-span-2 {
    grid-column: 1 / -1;
}
.public-course-group,
.public-declaration-group {
    display: grid;
    gap: 0.9rem;
}
.public-field-label {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.public-field-label.is-manual-required::after {
    content: " *";
    color: var(--primary-dark);
    font-weight: 700;
}
.public-course-radio-list {
    display: grid;
    gap: 0.85rem;
}
.public-course-option {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(80, 49, 40, 0.1);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}
.public-registration-form label.public-course-option {
    display: grid !important;
    grid-template-columns: 1.1rem minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 0.9rem !important;
    row-gap: 0 !important;
}
.public-registration-form label.public-course-option > span {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    align-self: center !important;
}
.public-course-option input[type="checkbox"] {
    display: inline-block;
    width: 1.1rem !important;
    min-width: 1.1rem !important;
    max-width: 1.1rem !important;
    height: 1.1rem;
    min-height: 1.1rem;
    padding: 0;
    border: 0;
    border-bottom: 0;
    border-radius: 0.25rem;
    background: transparent;
    box-shadow: none;
    margin: 0 !important;
    vertical-align: middle;
    align-self: center !important;
    justify-self: start;
    flex: 0 0 auto;
    accent-color: var(--primary);
}
.public-course-option-copy {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    align-self: center;
}
.public-capacity-hint {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}
.public-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.public-form-actions .btn {
    min-width: 220px;
    min-height: 52px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
}
.public-checkbox-row {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(80, 49, 40, 0.1);
    background: rgba(255, 255, 255, 0.8);
}
.public-checkbox-row input[type="checkbox"] {
    min-height: 1rem;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.22rem;
}
.public-checkbox-row span {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text);
}
.public-registration-form .field-invalid {
    border-bottom-color: var(--danger);
    box-shadow: inset 0 -2px 0 rgba(185, 63, 63, 0.9);
}
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 0.6rem; }
.demo-box { margin-top: 1rem; color: var(--muted); }

.invoice-sheet { max-width: 920px; }
.invoice-summary { display: grid; justify-content: end; gap: 0.4rem; margin-top: 1rem; font-weight: 700; }
.invoice-builder,
.invoice-preview-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
}
.invoice-item-list {
    display: grid;
    gap: 0.9rem;
}
.invoice-item-card {
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.invoice-item-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr) minmax(120px, 0.75fr) auto;
    gap: 0.9rem;
    align-items: end;
}
.invoice-item-actions {
    display: flex;
    justify-content: flex-end;
}
.invoice-preview-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.invoice-preview-summary div {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
}
.invoice-preview-summary span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
}
.invoice-preview-summary strong {
    font-size: 1.1rem;
}
.settings-split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.5rem;
}
.settings-split-grid.automation-layout-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.accordion-group {
    display: grid;
    gap: 1rem;
}
.accordion-item {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.58);
    overflow: hidden;
}
.accordion-summary {
    list-style: none;
    cursor: pointer;
    padding: 1.15rem 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
}
.accordion-summary::-webkit-details-marker {
    display: none;
}
.accordion-summary span:last-child {
    font-weight: 500;
    color: var(--muted);
    text-align: right;
}
.accordion-body {
    border-top: 1px solid var(--line);
    padding: 1.3rem;
    display: grid;
    gap: 1rem;
}
.lms-inline-header {
    margin: 1.5rem 0 1rem;
}
.student-learning-list {
    display: grid;
    gap: 0.9rem;
}
.student-learning-topic {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    overflow: hidden;
}
.student-learning-topic summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 700;
}
.student-learning-topic summary::-webkit-details-marker {
    display: none;
}
.student-learning-topic[open] summary {
    border-bottom: 1px solid var(--line);
    background: rgba(207, 138, 107, 0.08);
}
.student-learning-topic summary small {
    color: var(--muted);
    font-weight: 600;
}
.student-learning-topic-description {
    margin: 0;
    padding: 0.95rem 1.15rem 0;
    color: var(--muted);
}
.student-learning-lesson-list {
    display: grid;
    gap: 0.65rem;
    padding: 1rem 1.15rem 1.15rem;
}
.student-learning-lesson-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: rgba(240, 236, 236, 0.65);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.student-learning-lesson-row:hover,
.student-learning-lesson-row.is-active {
    background: rgba(207, 138, 107, 0.12);
    border-color: rgba(207, 138, 107, 0.35);
    transform: translateY(-1px);
}
.student-learning-lesson-row small {
    color: var(--muted);
    font-weight: 600;
    text-align: right;
}
.student-learning-shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
}
.student-learning-sidebar {
    position: sticky;
    top: 1rem;
}
.student-learning-content {
    min-width: 0;
}
.student-learning-summary {
    margin-bottom: 1rem;
    color: var(--muted);
    line-height: 1.7;
}
.student-learning-rich-content {
    font-size: 1rem;
}
.student-learning-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.student-learning-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.student-learning-resource {
    padding: 1rem 0 0.25rem;
}
.muted {
    color: var(--muted);
}
.presentation-slide-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}
.presentation-slide-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    padding: 1rem;
    display: grid;
    gap: 1rem;
}
.presentation-slide-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.presentation-slide-body {
    min-height: 220px;
}
.presentation-app {
    min-height: calc(100vh - 10rem);
}
.presentation-app-viewer {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: calc(100vh - 10rem);
}
.presentation-app-presenter {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(420px, 540px);
    gap: 1rem;
    position: relative;
}
.presentation-viewer-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.presentation-app-viewer.is-viewer-fullscreen .presentation-viewer-toolbar,
.presentation-app-viewer:fullscreen .presentation-viewer-toolbar {
    display: none;
}
.presentation-app-viewer.is-viewer-fullscreen,
.presentation-app-viewer:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    background: #000;
    padding: 0;
    margin: 0;
}
.presentation-stage-shell,
.presentation-presenter-sidebar,
.presentation-viewer-stage {
    border-radius: 14px;
    overflow: hidden;
}
.presentation-stage-shell,
.presentation-viewer-stage {
    background: linear-gradient(135deg, #fbf3ee 0%, #f2e9e2 100%);
    border: 1px solid rgba(157, 91, 66, 0.16);
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
    min-height: calc(100vh - 12rem);
    padding: 1.25rem;
    position: relative;
}
.presentation-app-viewer.is-viewer-fullscreen .presentation-viewer-stage,
.presentation-app-viewer:fullscreen .presentation-viewer-stage {
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #000;
}
.presentation-stage,
.presentation-viewer-stage {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    position: relative;
}
.presentation-slide {
    min-height: calc(100vh - 12rem);
    padding: clamp(2rem, 4vw, 4rem);
    display: grid;
    align-content: center;
    gap: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(207, 138, 107, 0.18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(127, 143, 85, 0.16), transparent 30%),
        linear-gradient(135deg, #fefaf8 0%, #f5ede8 100%);
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.presentation-slide h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
}
.presentation-slide .presentation-slide-body {
    min-height: auto;
    font-size: clamp(1rem, 1.65vw, 1.28rem);
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.presentation-slide.presentation-layout-focus {
    text-align: center;
    justify-items: center;
}
.presentation-slide.presentation-layout-split .presentation-slide-body {
    column-count: 2;
    column-gap: 2rem;
}
.presentation-presenter-sidebar {
    background: #fffaf8;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 1rem;
    display: grid;
    align-content: start;
    gap: 1rem;
}
.presentation-app-presenter.is-presenter-fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.55fr) minmax(420px, 560px);
    gap: 1rem;
    padding: 1rem;
    background: #f5eee9;
}
.presentation-app-presenter.is-presenter-fullscreen .presentation-stage-shell,
.presentation-app-presenter.is-presenter-fullscreen .presentation-presenter-sidebar {
    min-height: calc(100vh - 2rem);
}
.presentation-presenter-meta p {
    color: var(--muted);
    margin-bottom: 0;
}
.presentation-control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.presentation-timer-card,
.presentation-sidebar-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    padding: 1rem;
}
.presentation-timer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.presentation-timer-card strong {
    font-size: 1.6rem;
}
.presentation-sidebar-card h3 {
    margin-bottom: 0.6rem;
}
.presentation-sidebar-card-notes {
    min-height: 260px;
}
.presentation-sidebar-card-notes [data-presentation-notes] {
    min-height: 180px;
    max-height: 42vh;
    overflow: auto;
    line-height: 1.7;
}
.presentation-next-preview-shell {
    display: grid;
    gap: 0.75rem;
}
.presentation-preview-frame {
    display: grid;
    place-items: center;
    padding: 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(157, 91, 66, 0.14);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(249, 242, 236, 0.96));
    min-height: 170px;
}
.presentation-preview-frame .presentation-runtime-slide {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(48, 32, 24, 0.12);
}
.presentation-preview-meta {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.presentation-empty-state {
    min-height: calc(100vh - 12rem);
    display: grid;
    place-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 1.1rem;
}
.presentation-runtime-slide {
    width: 100%;
    max-width: min(100%, calc((100vh - 16rem) * 1.7777778));
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(207, 138, 107, 0.16), transparent 35%),
        radial-gradient(circle at bottom right, rgba(127, 143, 85, 0.14), transparent 30%),
        linear-gradient(135deg, #fffdfb 0%, #f5ede8 100%);
    box-shadow: 0 28px 70px rgba(48, 32, 24, 0.14);
    border: 1px solid rgba(157, 91, 66, 0.16);
}
.presentation-app-viewer.is-viewer-fullscreen .presentation-runtime-slide,
.presentation-app-viewer:fullscreen .presentation-runtime-slide {
    width: min(100vw, calc(100vh * 1.7777778));
    max-width: min(100vw, calc(100vh * 1.7777778));
    max-height: 100vh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
}
.presentation-app-presenter.is-presenter-fullscreen .presentation-runtime-slide {
    max-width: min(100%, calc((100vh - 7rem) * 1.7777778));
}
.presentation-runtime-canvas {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: top left;
}
.presentation-runtime-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--presentation-slide-background-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.presentation-runtime-slide.has-background::before {
    opacity: 1;
}
.presentation-runtime-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.14), rgba(255, 255, 255, 0.06));
    pointer-events: none;
}
.presentation-laser-pointer {
    position: absolute;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(122, 255, 76, 0.98) 0%, rgba(122, 255, 76, 0.78) 32%, rgba(61, 255, 71, 0.28) 58%, rgba(61, 255, 71, 0) 82%);
    box-shadow: 0 0 0 2px rgba(154, 255, 126, 0.18), 0 0 14px rgba(94, 255, 92, 0.92), 0 0 28px rgba(65, 255, 80, 0.45);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
    z-index: 6;
}
.presentation-laser-pointer.is-visible {
    opacity: 1;
    transform: scale(1);
}
.presentation-grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(33, 24, 20, 0.45);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    padding: 1.25rem;
    z-index: 12;
}
.presentation-grid-overlay[hidden] {
    display: none;
}
.presentation-grid-dialog {
    width: min(1180px, 100%);
    max-height: min(86vh, 920px);
    overflow: auto;
    background: rgba(255, 251, 247, 0.98);
    border: 1px solid rgba(157, 91, 66, 0.16);
    border-radius: 18px;
    box-shadow: 0 28px 60px rgba(48, 32, 24, 0.22);
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
}
.presentation-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.presentation-grid-header h3 {
    margin: 0;
}
.presentation-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.presentation-grid-slide {
    border: 1px solid rgba(157, 91, 66, 0.16);
    border-radius: 14px;
    background: #fff;
    padding: 0.75rem;
    display: grid;
    gap: 0.6rem;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.presentation-grid-slide:hover,
.presentation-grid-slide:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(48, 32, 24, 0.12);
    border-color: rgba(157, 91, 66, 0.38);
}
.presentation-grid-slide.is-active {
    border-color: rgba(157, 91, 66, 0.7);
    box-shadow: 0 0 0 2px rgba(157, 91, 66, 0.18);
}
.presentation-grid-slide-number {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.presentation-grid-slide-preview {
    display: grid;
    place-items: center;
    min-height: 140px;
    padding: 0.35rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(251, 243, 238, 0.9), rgba(242, 233, 226, 0.95));
}
.presentation-grid-slide-preview .presentation-runtime-slide {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(48, 32, 24, 0.1);
}
.presentation-grid-slide-title {
    font-size: 0.95rem;
    color: var(--ink);
}
.presentation-runtime-block {
    position: absolute;
    z-index: 1;
}
.presentation-runtime-block.is-fragment-hidden,
.presentation-runtime-fragment-line.is-fragment-hidden {
    opacity: 0;
    visibility: hidden;
}
.presentation-runtime-block.is-fragment-visible,
.presentation-runtime-fragment-line.is-fragment-visible {
    opacity: 1;
    visibility: visible;
    animation: presentationFadeIn 0.45s ease;
}
.presentation-runtime-fragment-line {
    display: block;
}
.presentation-runtime-slot-center_top {
    top: 11%;
    left: 50%;
    transform: translateX(-50%);
    width: min(72%, 1200px);
    text-align: center;
}
.presentation-runtime-slot-center_middle {
    top: 36%;
    left: 50%;
    transform: translateX(-50%);
    width: min(72%, 1200px);
    text-align: center;
}
.presentation-runtime-slot-center_bottom {
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%);
    width: min(72%, 1200px);
    text-align: center;
}
.presentation-runtime-slot-left_top {
    top: 12%;
    left: 7%;
    width: min(38%, 620px);
}
.presentation-runtime-slot-left_middle {
    top: 33%;
    left: 7%;
    width: min(38%, 620px);
}
.presentation-runtime-slot-right_middle {
    top: 33%;
    right: 7%;
    width: min(38%, 620px);
}
.presentation-runtime-slot-main {
    top: 18%;
    left: 9%;
    right: 9%;
    bottom: 16%;
    display: flex;
    align-items: center;
}
.presentation-runtime-slot-footer {
    left: 9%;
    right: 9%;
    bottom: 7%;
    text-align: center;
}
.presentation-runtime-copy {
    margin: 0;
    color: #302018;
    text-wrap: balance;
}
.presentation-runtime-copy-richtext {
    line-height: 1.55;
}
.presentation-runtime-copy-richtext > *:first-child {
    margin-top: 0;
}
.presentation-runtime-copy-richtext > *:last-child {
    margin-bottom: 0;
}
.presentation-runtime-copy-h2 {
    font-size: clamp(2.75rem, 4vw, 4.4rem);
    line-height: 1.08;
}
.presentation-runtime-copy-h3 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.16;
}
.presentation-runtime-copy-h4 {
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.24;
    color: rgba(48, 32, 24, 0.82);
}
.presentation-runtime-copy-p {
    font-size: clamp(1.15rem, 1.65vw, 1.65rem);
    line-height: 1.75;
}
.presentation-runtime-slide.is-entering {
    animation: presentationFadeIn 0.38s ease;
}
@keyframes presentationFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.presentation-runtime-figure {
    margin: 0;
    display: grid;
    gap: 1rem;
}
.presentation-runtime-image {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(48, 32, 24, 0.18);
}
.presentation-runtime-caption {
    margin: 0;
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.6;
    color: rgba(48, 32, 24, 0.82);
}
.presentation-runtime-type-image.presentation-runtime-slot-center_middle,
.presentation-runtime-type-image.presentation-runtime-slot-main {
    left: 8%;
    right: 8%;
    width: auto;
    transform: none;
    text-align: center;
}
.presentation-runtime-type-image.presentation-runtime-slot-center_middle .presentation-runtime-figure,
.presentation-runtime-type-image.presentation-runtime-slot-main .presentation-runtime-figure {
    justify-items: center;
}
.presentation-runtime-type-image.presentation-runtime-slot-center_middle .presentation-runtime-image,
.presentation-runtime-type-image.presentation-runtime-slot-main .presentation-runtime-image {
    max-width: min(100%, 1180px);
}
.presentation-runtime-type-image.presentation-runtime-slot-footer .presentation-runtime-image {
    max-height: 200px;
}
.presentation-block-list {
    display: grid;
    gap: 1rem;
}
.presentation-block-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    padding: 1rem;
    display: grid;
    gap: 1rem;
}
.presentation-block-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.presentation-editor-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) 340px;
    gap: 1rem;
    height: calc(100vh - 14rem);
    min-height: 700px;
    align-items: stretch;
}
.presentation-editor-sidebar,
.presentation-editor-main {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    min-height: 0;
}
.presentation-editor-sidebar {
    padding: 1rem;
    overflow: auto;
}
.presentation-editor-sidebar-section {
    display: grid;
    gap: 0.85rem;
}
.presentation-editor-sidebar-section + .presentation-editor-sidebar-section {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(157, 91, 66, 0.12);
}
.presentation-editor-properties-scroll {
    display: grid;
    gap: 1rem;
}
.presentation-editor-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0;
}
.presentation-editor-panel-heading h3 {
    margin-bottom: 0.2rem;
}
.presentation-editor-panel-heading p,
.presentation-editor-toolbar span,
.presentation-editor-library-item span {
    color: var(--muted);
    font-size: 0.85rem;
}
.presentation-editor-slide-list,
.presentation-editor-block-library,
.presentation-editor-properties-scroll {
    display: grid;
    gap: 0.75rem;
}
.presentation-editor-slide-section {
    display: grid;
    gap: 0.7rem;
    padding: 0.85rem;
    border: 1px solid rgba(157, 91, 66, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.54);
}
.presentation-editor-slide-section + .presentation-editor-slide-section {
    margin-top: 0.2rem;
}
.presentation-editor-slide-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.presentation-editor-slide-section-heading strong {
    display: block;
    font-size: 0.92rem;
}
.presentation-editor-slide-section-heading p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}
.presentation-editor-slide-section-list {
    display: grid;
    gap: 0.65rem;
}
.presentation-editor-slide-empty {
    margin: 0;
}
.presentation-editor-slide-card,
.presentation-editor-library-item {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfaf9;
    padding: 0.7rem 0.8rem;
    text-align: left;
    cursor: pointer;
}
.presentation-editor-slide-card.is-active {
    border-color: var(--primary);
    background: rgba(207, 138, 107, 0.12);
}
.presentation-editor-slide-card strong,
.presentation-editor-library-item strong,
.presentation-editor-library-item span {
    display: block;
}
.presentation-editor-slide-card strong {
    font-size: 0.95rem;
    font-weight: 700;
}
.presentation-editor-inspector-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}
.presentation-editor-inspector-tab {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfaf9;
    color: var(--muted);
    padding: 0.7rem 0.85rem;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
}
.presentation-editor-inspector-tab.is-active {
    border-color: var(--primary);
    background: rgba(207, 138, 107, 0.12);
    color: var(--ink);
}
.presentation-editor-inspector-tab.is-disabled,
.presentation-editor-inspector-tab:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.presentation-editor-inspector-panel {
    display: none;
}
.presentation-editor-inspector-panel.is-active {
    display: block;
}
.presentation-editor-main {
    padding: 1rem;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1rem;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.presentation-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.presentation-editor-stage-frame {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle at top left, rgba(207, 138, 107, 0.12), transparent 32%),
        linear-gradient(180deg, #f8f1ec 0%, #efe7e1 100%);
    border: 1px solid rgba(157, 91, 66, 0.14);
    padding: 1rem;
    align-self: center;
}
.presentation-editor-stage-scale {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}
.presentation-editor-stage {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: top left;
    background:
        radial-gradient(circle at top left, rgba(207, 138, 107, 0.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(127, 143, 85, 0.12), transparent 28%),
        linear-gradient(135deg, #fffdfb 0%, #f5ede8 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(48, 32, 24, 0.18);
}
.presentation-editor-canvas-block {
    position: absolute;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    cursor: move;
    background: transparent;
}
.presentation-editor-canvas-block[data-block-type="richtext"] {
    overflow: auto;
}
.presentation-editor-canvas-block.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(207, 138, 107, 0.22);
}
.presentation-editor-canvas-copy {
    margin: 0;
    width: 100%;
    height: 100%;
    padding: 0.35rem 0.45rem;
    text-wrap: balance;
    overflow: hidden;
}
.presentation-editor-canvas-copy-h2 { font-size: 68px; line-height: 1.08; }
.presentation-editor-canvas-copy-h3 { font-size: 44px; line-height: 1.12; }
.presentation-editor-canvas-copy-h4 { font-size: 30px; line-height: 1.18; }
.presentation-editor-canvas-copy-p { font-size: 28px; line-height: 1.45; }
.presentation-editor-canvas-copy-richtext {
    font-size: 26px;
    line-height: 1.5;
    overflow: auto;
}
.presentation-editor-canvas-copy-richtext > *:first-child {
    margin-top: 0;
}
.presentation-editor-canvas-copy-richtext > *:last-child {
    margin-bottom: 0;
}
.presentation-editor-canvas-handle {
    position: absolute;
    left: 8px;
    top: 8px;
    border-radius: 999px;
    background: rgba(37, 24, 18, 0.82);
    color: #fff;
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    pointer-events: none;
}
.presentation-editor-canvas-resize {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(37, 24, 18, 0.82);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.presentation-editor-canvas-block.is-selected .presentation-editor-canvas-resize,
.presentation-editor-canvas-block:hover .presentation-editor-canvas-resize {
    opacity: 1;
    pointer-events: auto;
}
.presentation-editor-canvas-resize-n {
    top: -6px;
    left: calc(50% - 6px);
    cursor: ns-resize;
}
.presentation-editor-canvas-resize-ne {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}
.presentation-editor-canvas-resize-e {
    top: calc(50% - 6px);
    right: -6px;
    cursor: ew-resize;
}
.presentation-editor-canvas-resize-se {
    right: -6px;
    bottom: -6px;
    cursor: nwse-resize;
}
.presentation-editor-canvas-resize-s {
    bottom: -6px;
    left: calc(50% - 6px);
    cursor: ns-resize;
}
.presentation-editor-canvas-resize-sw {
    left: -6px;
    bottom: -6px;
    cursor: nesw-resize;
}
.presentation-editor-canvas-resize-w {
    top: calc(50% - 6px);
    left: -6px;
    cursor: ew-resize;
}
.presentation-editor-canvas-resize-nw {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}
.presentation-editor-inline-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}
.presentation-editor-modal-card {
    width: min(1180px, calc(100vw - 2rem));
}
.presentation-editor-modal-body {
    display: grid;
    gap: 1rem;
}
.presentation-editor-modal-toolbar-shell {
    display: grid;
    gap: 0.5rem;
}
.presentation-editor-modal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.presentation-editor-mode-tabs {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: #f7f1ec;
}
.presentation-editor-mode-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0.45rem 0.8rem;
    cursor: pointer;
}
.presentation-editor-mode-tab.is-active {
    background: #fff;
    color: var(--ink);
}
.presentation-editor-modal-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #f7f1ec;
    padding: 0.55rem;
}
.presentation-editor-wysiwyg-shell {
    border-radius: 0 0 10px 10px;
}
.presentation-editor-wysiwyg-visual {
    min-height: 420px;
}
.presentation-editor-wysiwyg-text {
    width: 100%;
    min-height: 420px;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 1rem 1.05rem;
    font: inherit;
    background: #fffdfc;
    color: var(--text);
    resize: vertical;
}
.presentation-editor-canvas-image-shell {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 0.35rem;
    padding: 0.4rem;
}
.presentation-editor-canvas-image-shell img,
.presentation-editor-canvas-image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.7);
}
.presentation-editor-canvas-image-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px dashed var(--line);
}
.presentation-editor-canvas-image-shell span {
    font-size: 0.82rem;
    color: var(--muted);
}
.presentation-editor-form-section {
    display: grid;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.9rem;
    background: #fffdfc;
}
.presentation-editor-form-section h4 {
    margin-bottom: 0;
}
.presentation-editor-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.presentation-editor-form-section textarea {
    min-height: 100px;
}
.presentation-editor-form-section .muted {
    margin: 0;
}
.subtle-panel {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed var(--line);
    box-shadow: none;
}
@media (max-width: 1180px) {
    .presentation-runtime-slide {
        max-width: 100%;
    }
    .presentation-editor-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .presentation-editor-stage-frame {
        min-height: 0;
        max-height: none;
    }
}
@media (max-width: 900px) {
    .presentation-app-presenter {
        grid-template-columns: 1fr;
    }
    .presentation-app-presenter.is-presenter-fullscreen {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
    .presentation-runtime-slot-left_top,
    .presentation-runtime-slot-left_middle,
    .presentation-runtime-slot-right_middle,
    .presentation-runtime-slot-main {
        left: 9%;
        right: 9%;
        width: auto;
    }
    .presentation-runtime-slot-right_middle {
        top: 56%;
    }
    .presentation-runtime-copy-h2 {
        font-size: clamp(2rem, 5.2vw, 3rem);
    }
    .presentation-runtime-copy-h3 {
        font-size: clamp(1.5rem, 4vw, 2.2rem);
    }
    .presentation-runtime-copy-p {
        font-size: clamp(1rem, 2.5vw, 1.25rem);
    }
}
.module-draft-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.module-draft-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.65);
    display: grid;
    gap: 0.9rem;
}
.module-draft-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 1rem;
}
.module-draft-grid .full {
    grid-column: 1 / -1;
}
.report-toolbar,
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.report-toolbar p,
.report-header p {
    color: var(--muted);
    margin-bottom: 0;
}
.report-sheet {
    background: #fff;
}
.metric-bar {
    position: relative;
    min-width: 140px;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(207, 138, 107, 0.12);
    overflow: hidden;
}
.metric-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(207, 138, 107, 0.32);
    border-radius: inherit;
}
.metric-bar-fill.secondary {
    background: rgba(127, 143, 85, 0.32);
}
.metric-bar strong {
    position: relative;
    z-index: 1;
}
.report-filters {
    align-items: end;
}
.report-filters button {
    align-self: end;
}
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.checkbox-row input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.checkbox-row span {
    margin-bottom: 0;
    color: var(--text);
    font-weight: 700;
}
.switch-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    user-select: none;
}
.switch-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.switch-slider {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.8);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.switch-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
}
.switch-toggle input[type="checkbox"]:checked + .switch-slider {
    background: var(--primary);
    border-color: var(--primary);
}
.switch-toggle input[type="checkbox"]:checked + .switch-slider::after {
    transform: translateX(18px);
}
.switch-label {
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
}
.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.2rem;
    margin-top: 0.7rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.compact-header {
    margin: 0 0 1rem;
}
.studio-service-toggle {
    width: 100%;
    min-height: 52px;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    justify-content: space-between;
}
.studio-service-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}
.studio-service-right-column {
    display: grid;
    gap: 1rem;
}
.currency-settings-block {
    padding: 1rem 1rem 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 86%, #ffffff 14%);
    box-shadow: var(--shadow-section);
}
.section-header,
.schedule-date-header,
.schedule-actions,
.modal-header,
.modal-actions,
.schedule-class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.detail-header > *,
.section-header > *,
.schedule-date-header > *,
.schedule-actions > *,
.modal-header > *,
.modal-actions > *,
.schedule-class-item > * {
    min-width: 0;
    max-width: 100%;
}
.section-header { margin: 1.2rem 0 1rem; }
.section-header > .table-actions {
    margin-left: auto;
}
.lms-course-meta {
    display: grid;
    gap: 0.35rem;
    text-align: right;
    color: var(--muted);
}
.lms-course-meta strong {
    color: var(--text);
    margin-right: 0.35rem;
}
.schedule-date-list,
.schedule-class-list,
.payment-plan-list {
    display: grid;
    gap: 1rem;
}
.schedule-date-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.schedule-date-card {
    background: #fff5f2;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1rem;
}
.schedule-date-details {
    width: 100%;
}
.schedule-date-summary {
    cursor: pointer;
    display: grid;
    gap: 0.28rem;
    list-style: none;
}
.schedule-date-summary::-webkit-details-marker {
    display: none;
}
.schedule-date-summary strong {
    font-size: 1rem;
    color: var(--text);
}
.schedule-date-summary span {
    color: var(--muted);
    font-size: 0.92rem;
}
.schedule-date-body {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.75rem;
}
.payment-plan-card {
    background: #fff5f2;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1rem;
}
.panel > form:not(.form-grid) > button[type="submit"] {
    margin-top: 1.75rem;
}
.payment-plan-card label {
    display: grid;
    gap: 0.42rem;
}
.payment-plan-card select[data-plan-field="discount_type"] {
    min-height: 52px;
}
.modal-helper-text {
    margin-top: 0.2rem;
    color: var(--muted);
}
.modal-repeater-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}
.modal-repeater-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
}
.date-section-card details {
    width: 100%;
}
.date-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
}
.date-section-summary::-webkit-details-marker {
    display: none;
}
.date-section-summary span {
    color: var(--muted);
    font-size: 0.92rem;
}
.date-section-actions {
    margin: 0.65rem 0 0.9rem;
    display: flex;
    justify-content: flex-end;
}
.modal-repeater-header {
    margin-bottom: 0.95rem;
}
.modal-plan-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}
.modal-plan-individual-toggle {
    margin: 0;
}
.modal-plan-individual-toggle .switch-label {
    font-size: 0.85rem;
}
.modal-repeater-card.is-individual-plan .payment-plan-repeater-grid {
    display: none;
}
.modal-inline-tools {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
}
.modal-repeater-section {
    margin-top: 1rem;
}
.modal-repeater-section > h4 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}
.date-repeater-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: end;
}
.payment-plan-repeater-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: flex-start;
}
.date-repeater-grid label {
    min-width: 0;
}
.payment-plan-repeater-grid label {
    min-width: 0;
    flex: 1 1 150px;
}
.date-repeater-grid .date-field-date {
    grid-column: span 4;
}
.date-repeater-grid .date-field-date .date-type-inline {
    margin: 0;
}
.date-repeater-grid .date-field-date .date-primary-row {
    display: grid;
    grid-template-columns: minmax(145px, 1.1fr) minmax(148px, 1fr);
    gap: 0.55rem;
    align-items: center;
}
.date-repeater-grid .date-field-date .date-primary-row.has-secondary {
    grid-template-columns: minmax(145px, 1.1fr) minmax(138px, 1fr) minmax(138px, 1fr);
}
.date-repeater-grid .date-field-date .date-secondary-readonly {
    opacity: 0.9;
}
.date-repeater-grid .date-field-teacher {
    grid-column: span 2;
}
.date-repeater-grid .date-field-studio {
    grid-column: span 5;
}
.date-repeater-grid .date-field-classroom {
    grid-column: span 5;
}
.date-repeater-grid .date-field-time {
    grid-column: span 2;
}
.date-repeater-grid .date-field-time input[type="time"] {
    min-width: 145px;
    width: 100%;
    padding-right: 0.95rem;
    -webkit-appearance: none;
    appearance: none;
    background-image: none;
    cursor: text;
}
.date-repeater-grid .date-field-time input[type="time"]::-webkit-calendar-picker-indicator {
    display: none;
    opacity: 0;
    width: 0;
    pointer-events: none;
}
.date-repeater-grid .date-field-time input[type="time"]::-webkit-clear-button,
.date-repeater-grid .date-field-time input[type="time"]::-webkit-inner-spin-button {
    display: none;
}
.date-repeater-grid label span {
    min-height: 2.35rem;
    display: flex;
    align-items: flex-end;
}
.payment-plan-repeater-grid label span {
    min-height: 2.35rem;
    display: flex;
    align-items: flex-end;
}
.payment-plan-repeater-grid .plan-field-name {
    flex-basis: 190px;
}
.payment-plan-repeater-grid .plan-field-fee,
.payment-plan-repeater-grid .plan-field-type,
.payment-plan-repeater-grid .plan-field-value,
.payment-plan-repeater-grid .plan-field-registration,
.payment-plan-repeater-grid .plan-field-advance {
    flex-basis: 145px;
}
.payment-plan-repeater-grid .plan-field-installments {
    flex-basis: 125px;
    max-width: 145px;
}
.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.profile-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 768px) {
    .profile-two-col { grid-template-columns: 1fr; }
}
.settings-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 768px) {
    .settings-two-col { grid-template-columns: 1fr; }
}
.user-profile-header {
    padding: 0.75rem 1.25rem;
}
.user-profile-header .section-header {
    margin: 0;
    align-items: center;
}
.form-grid > button[type="submit"],
.form-grid > .form-actions > button[type="submit"] {
    justify-self: start;
    width: auto;
}
.summary-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    padding: 1rem;
}
.profile-meta {
    margin: 0;
    display: grid;
    gap: 0.75rem;
}
.payment-plan-card .profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.4rem;
    align-items: center;
}
.profile-meta div {
    display: grid;
    gap: 0.2rem;
}
.payment-plan-card .profile-meta div {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}
.profile-meta dt {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.payment-plan-card .profile-meta dt {
    font-size: 0.82rem;
    letter-spacing: 0;
}
.profile-meta dd {
    margin: 0;
    font-weight: 700;
}
.presentation-meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.4rem;
    align-items: center;
    margin-top: 0.55rem;
}
.presentation-meta-inline div {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}
.presentation-meta-inline dt {
    font-size: 0.82rem;
    letter-spacing: 0;
}
.presentation-meta-inline-secondary {
    margin-top: 0.35rem;
}
.presentation-show-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 380px);
    align-items: start;
}
.presentation-edit-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 380px);
    align-items: start;
}
.slide-template-edit-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 380px);
    align-items: start;
}
.presentation-slides-panel {
    display: grid;
    gap: 1rem;
}
.presentation-show-slide-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.presentation-show-slide-card {
    display: grid;
    gap: 0.65rem;
}
.presentation-show-slide-canvas {
    left: 0;
    top: 0;
    transform-origin: top left;
}
.presentation-theme-sidebar {
    position: sticky;
    top: 1rem;
}
.slide-template-preview-section {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}
.slide-template-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.slide-template-preview-card {
    display: grid;
    gap: 0.85rem;
}
.slide-template-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.slide-template-preview-heading span {
    font-size: 0.82rem;
    color: var(--muted);
    text-transform: capitalize;
}
.slide-template-preview-frame {
    border: 1px solid rgba(157, 91, 66, 0.16);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.slide-template-preview-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #fffdfb;
    background-size: cover;
    background-position: center;
}
.slide-template-preview-block {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0.2rem 0.28rem;
    border-radius: 6px;
    color: #2e140d;
    background: rgba(255, 255, 255, 0.78);
    line-height: 1.15;
    font-weight: 600;
}
.slide-template-preview-block.is-image {
    justify-content: center;
    background: rgba(48, 32, 24, 0.08);
    border: 1px dashed rgba(48, 32, 24, 0.18);
}
.slide-template-preview-block span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
@media (max-width: 1500px) {
    .presentation-show-slide-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .slide-template-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 1180px) {
    .presentation-show-slide-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .slide-template-edit-grid {
        grid-template-columns: 1fr;
    }
    .studio-service-columns {
        grid-template-columns: 1fr;
    }
    .presentation-theme-sidebar {
        position: static;
    }
}
@media (max-width: 760px) {
    .presentation-show-slide-list {
        grid-template-columns: 1fr;
    }
    .slide-template-preview-grid {
        grid-template-columns: 1fr;
    }
}
.access-table select {
    min-width: 180px;
}
.user-role-panel,
.registration-student-panel {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 86%, #ffffff 14%);
    box-shadow: var(--shadow-section);
}
.user-role-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.8rem;
    margin-top: 0.5rem;
}
.user-role-options .checkbox-row {
    margin: 0;
}

.student-learning-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 330px;
    gap: 0.9rem;
    align-items: start;
}
.student-learning-left,
.student-learning-main,
.student-learning-right {
    position: sticky;
    top: 0.5rem;
}
.student-learning-left-head h3 {
    margin-bottom: 0.2rem;
}
.student-learning-left-head p {
    color: var(--muted);
    margin-bottom: 0.8rem;
}
.student-learning-topic-stack {
    display: grid;
    gap: 0.65rem;
}
.student-learning-topic {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.45rem 0.55rem;
    background: #fffdfc;
}
.student-learning-topic summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    gap: 0.75rem;
}
.student-learning-topic summary::-webkit-details-marker {
    display: none;
}
.student-learning-topic summary span {
    color: var(--muted);
    font-size: 0.85rem;
}
.student-learning-lesson-links {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.35rem;
}
.student-learning-lesson-links a {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
    background: rgba(255, 255, 255, 0.65);
}
.student-learning-lesson-links a:hover {
    border-color: var(--line);
}
.student-learning-lesson-links a.active {
    border-color: rgba(207, 138, 107, 0.45);
    background: rgba(207, 138, 107, 0.12);
}
.student-learning-lesson-links a small {
    display: block;
    color: var(--muted);
    margin-top: 0.1rem;
}
.student-learning-main {
    min-height: 70vh;
}
.student-learning-meta-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    background: #fffdfc;
    color: var(--muted);
    font-size: 0.82rem;
}
.hidden-field {
    display: none;
}
.payment-plan-card label.hidden-field,
.form-grid label.hidden-field {
    display: none !important;
}
.schedule-class-item {
    border-top: 1px solid var(--line);
    padding-top: 0.8rem;
}
.course-builder-section {
    margin-top: 1.75rem;
}
.course-setup-note {
    margin-top: 1.75rem;
}
.course-form-actions {
    margin-top: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
[data-registration-form] .course-form-actions .btn {
    min-width: 210px;
    white-space: nowrap;
}
.empty-state,
.empty-inline {
    color: var(--muted);
}
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.status-badge-active {
    background: rgba(127, 143, 85, 0.14);
    border-color: rgba(127, 143, 85, 0.45);
    color: #4d6130;
}
.status-badge-suspended,
.status-badge-suspended_group,
.status-badge-suspended_all {
    background: rgba(185, 63, 63, 0.12);
    border-color: rgba(185, 63, 63, 0.45);
    color: #8d2f2f;
}
.community-assignment-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}
.community-groups-page {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.community-groups-main,
.community-groups-audit-panel {
    min-width: 0;
}
.community-create-group-form {
    margin-top: 0.8rem;
    margin-bottom: 1rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
}
.community-create-group-form .btn {
    height: 42px;
    white-space: nowrap;
}
.community-filter-grid {
    margin-top: 0.8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.community-groups-page label > span {
    display: inline-block;
    margin-bottom: 0.35rem;
}
.community-groups-page input,
.community-groups-page select {
    width: 100%;
    min-height: 40px;
}
.community-groups-page select[multiple] {
    min-height: 0;
}
.community-groups-page .inline-form {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    gap: 0.5rem;
}
.community-table-inline-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
}
.community-table-inline-form .btn,
.community-button-only-form .btn {
    min-height: 40px;
    white-space: nowrap;
}
.community-button-only-form {
    width: auto;
    max-width: none;
}
.community-groups-audit-panel {
    position: sticky;
    top: 0.5rem;
}
.community-right-groups-list {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}
.community-right-group-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
}
.community-right-group-link small {
    color: var(--muted);
    font-size: 0.82rem;
    margin-left: 0.35rem;
}
.community-right-group-link.active {
    border-color: rgba(157, 91, 66, 0.42);
    background: rgba(207, 138, 107, 0.12);
}
.community-assignment-left,
.community-assignment-right {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    padding: 0.85rem;
}
.community-members-tree {
    display: grid;
    gap: 0.6rem;
    max-height: 560px;
    overflow: auto;
    padding-right: 0.2rem;
}
.community-member-course,
.community-member-group {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
}
.community-member-course > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.35rem 0.45rem;
}
.community-member-course > summary::-webkit-details-marker {
    display: none;
}
.community-member-course.is-suspended {
    border-color: rgba(185, 63, 63, 0.45);
    background: rgba(185, 63, 63, 0.08);
}
.community-member-group-title {
    padding: 0.55rem 0.75rem 0.2rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.community-member-children {
    display: grid;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem 0.55rem 1.15rem;
}
.community-member-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0.2rem;
    border-radius: 6px;
    border: 0;
    width: 100%;
    text-align: left;
    background: transparent;
    color: inherit;
}
.community-member-row:hover {
    background: rgba(207, 138, 107, 0.08);
}
.community-member-row.is-selected {
    background: rgba(127, 143, 85, 0.16);
    box-shadow: inset 0 0 0 1px rgba(127, 143, 85, 0.48);
}
.community-pick-toggle {
    border: 1px solid rgba(157, 91, 66, 0.35);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.3rem 0.58rem;
    cursor: pointer;
    white-space: nowrap;
}
.community-pick-toggle.is-selected {
    background: rgba(127, 143, 85, 0.22);
    border-color: rgba(127, 143, 85, 0.58);
    color: #42592a;
}
.community-member-row.is-suspended {
    color: #9f2e2e;
    font-weight: 700;
}
.community-member-row-readonly {
    opacity: 0.82;
    cursor: default;
}
.community-audit-details {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    padding: 0.55rem 0.7rem;
}
.community-audit-details > summary {
    list-style: none;
    cursor: pointer;
}
.community-audit-details > summary::-webkit-details-marker {
    display: none;
}
.community-audit-details > summary h3 {
    margin: 0;
}
.community-audit-details > summary p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}
.community-assignment-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}
.community-assignment-actions form {
    display: grid;
    gap: 0.6rem;
}
.community-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-width: 1px;
    border-style: solid;
}
.community-action-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.community-action-icon:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.community-action-icon-add {
    background: rgba(127, 143, 85, 0.16);
    border-color: rgba(127, 143, 85, 0.5);
    color: #42592a;
}
.community-action-icon-add:hover {
    background: rgba(127, 143, 85, 0.26);
}
.community-action-icon-remove {
    background: rgba(207, 138, 107, 0.16);
    border-color: rgba(157, 91, 66, 0.46);
    color: #8a4f39;
}
.community-action-icon-remove:hover {
    background: rgba(207, 138, 107, 0.28);
}
.community-action-icon-suspend {
    background: rgba(185, 63, 63, 0.16);
    border-color: rgba(185, 63, 63, 0.52);
    color: #8f2f2f;
}
.community-action-icon-suspend:hover {
    background: rgba(185, 63, 63, 0.28);
}
.community-action-icon-reactivate {
    background: rgba(74, 130, 163, 0.16);
    border-color: rgba(74, 130, 163, 0.52);
    color: #2f6080;
}
.community-action-icon-reactivate:hover {
    background: rgba(74, 130, 163, 0.28);
}
.community-action-icon-reactivate:disabled:hover,
.community-action-icon-suspend:disabled:hover,
.community-action-icon-remove:disabled:hover,
.community-action-icon-add:disabled:hover {
    background: inherit;
}
.community-option-suspended {
    color: #9f2e2e;
    font-weight: 700;
}
@media (max-width: 1080px) {
    .community-groups-page {
        grid-template-columns: 1fr;
    }
    .community-create-group-form,
    .community-filter-grid,
    .community-table-inline-form {
        grid-template-columns: 1fr;
    }
    .community-create-group-form .btn,
    .community-table-inline-form .btn,
    .community-button-only-form .btn {
        width: 100%;
    }
    .community-groups-audit-panel {
        position: static;
    }
    .community-assignment-grid {
        grid-template-columns: 1fr;
    }
    .community-assignment-actions {
        justify-content: flex-start;
    }
    .community-assignment-actions form {
        grid-auto-flow: column;
        grid-auto-columns: min-content;
    }
}
.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: start center;
    padding: 6vh 1rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    isolation: isolate;
}
.modal-shell[hidden] {
    display: none !important;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(60, 37, 30, 0.45);
    z-index: 0;
}
.modal-card {
    position: relative;
    z-index: 1;
    width: min(1320px, 100%);
    max-height: min(calc(100vh - 7vh), 920px);
    margin: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    clip-path: inset(0 round 22px);
    box-shadow: var(--shadow);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-card-scroll {
    flex: 1;
    min-height: 0;
    padding: 1.4rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}
.modal-card-scroll::-webkit-scrollbar {
    width: 11px;
}
.modal-card-scroll::-webkit-scrollbar-track {
    margin: 12px 0;
    background: transparent;
}
.modal-card-scroll::-webkit-scrollbar-thumb {
    background: rgba(94, 79, 73, 0.35);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
.modal-card-wide {
    width: min(1440px, 100%);
}
.modal-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.modal-actions {
    margin-top: 1.25rem;
}

@media (max-width: 1200px) {
    .panel-grid { grid-template-columns: 1fr; }
    .student-learning-shell { grid-template-columns: 1fr; }
    .student-learning-sidebar { position: static; }
    .presentation-app-presenter { grid-template-columns: 1fr; }
    .auth-shell {
        width: min(1240px, 100%);
    }
    .auth-page {
        grid-template-columns: 1fr;
    }
    .auth-login-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .auth-login-visual-side {
        transform: translateX(-8vw);
    }
    .auth-brand-panel,
    .auth-form-panel {
        padding: 2rem;
    }
    .auth-illustration-panel {
        padding: 0;
        min-height: 420px;
    }
    .public-form-card {
        padding: 2rem;
    }
    .public-form-title {
        font-size: clamp(1.9rem, 9vw, 2.6rem);
    }
    .public-form-grid {
        grid-template-columns: 1fr;
    }
    .public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) {
        grid-template-columns: 1fr;
        row-gap: 0.35rem;
    }
    .public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) > input,
    .public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) > select,
    .public-form-grid > label:not(.public-course-option):not(.public-checkbox-row) > span {
        grid-column: auto;
    }
    .public-registration-form .field-error-inside {
        right: 0;
        bottom: 0.75rem;
    }
    .public-form-grid > label,
    .public-third-field,
    .field-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 1080px) {
    .stats-grid, .form-grid-3, .settings-split-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .settings-hub { grid-template-columns: 1fr; }
    .tab-nav-vertical {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .student-learning-shell {
        grid-template-columns: 1fr;
    }
    .student-learning-left,
    .student-learning-main,
    .student-learning-right {
        position: static;
    }
}

@media (max-width: 1024px) and (orientation: portrait), (max-width: 932px) {
    .auth-login-stage {
        justify-items: center;
        padding: 0.75rem;
    }
    .auth-login-card {
        grid-template-columns: 1fr;
    }
    .auth-login-visual-side {
        display: none;
    }
    .auth-login-form-side,
    .auth-login-body .auth-login-form-side {
        width: min(460px, 100%);
        margin: 5px auto;
        min-height: auto;
        padding: 1.6rem 1.2rem 1.2rem;
        border-left: 0;
    }
    .app-body { padding: 0; }
    .app-shell {
        min-height: 100vh;
        border-radius: 0;
        border: none;
        padding: 0.85rem;
        max-width: 100%;
        overflow-x: clip;
    }
    .workspace-shell { grid-template-columns: 1fr; }
    .menu-toggle {
        display: block;
        top: max(0.75rem, env(safe-area-inset-top));
        right: max(0.75rem, env(safe-area-inset-right));
        width: 48px;
        height: 48px;
        padding: 0.78rem;
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(60, 37, 30, 0.45);
        z-index: 39;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        bottom: auto;
        width: min(330px, 88vw);
        max-width: calc(100vw - 1rem);
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        overflow-y: visible;
        height: auto;
        min-height: 0;
        border-radius: 0 20px 20px 0;
    }
    .main-panel {
        padding: 1rem;
    }
    body.menu-open {
        overflow-x: hidden;
        overflow-y: auto;
    }
    body.menu-open .sidebar {
        transform: translateX(0);
    }
    body.menu-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
        display: block;
    }
    body.menu-open .menu-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    body.menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }
    body.menu-open .menu-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 820px) {
    .sidebar { padding-bottom: 1rem; }
    .stats-grid, .form-grid-2, .form-grid-3, .settings-split-grid, .invoice-item-grid, .invoice-preview-summary { grid-template-columns: 1fr; }
    .group-enrollment-layout { grid-template-columns: 1fr; }
    .schedule-date-list { grid-template-columns: 1fr; }
    .auth-body {
        padding: 0.75rem;
    }
    .auth-shell {
        width: 100%;
    }
    .auth-login-body .auth-flash {
        top: 0.75rem;
    }
    .auth-login-card {
        grid-template-columns: 1fr;
    }
    .auth-login-form-side,
    .auth-login-body .auth-login-form-side {
        width: min(414px, 100%);
        margin: 5px auto;
        min-height: auto;
        padding: 1.35rem 1rem 1rem;
        border-left: 0;
    }
    .auth-brand-panel,
    .auth-form-panel {
        padding: 1.35rem;
        border-radius: 24px;
    }
    .auth-illustration-panel {
        padding: 0;
        min-height: 320px;
    }
    .auth-method-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }
    .auth-method-tab,
    .auth-submit,
    .auth-secondary-submit {
        width: 100%;
        justify-content: center;
    }
    .shell-topbar,
    .shell-topbar-brand,
    .shell-topbar-actions,
    .toolbar,
    .detail-header,
    .invoice-head,
    .invoice-meta,
    .inline-form,
    .section-header,
    .schedule-date-header,
    .schedule-actions,
    .modal-header,
    .modal-actions,
    .schedule-class-item,
    .birthday-item,
    .accordion-summary,
    .report-toolbar,
    .report-header {
        flex-direction: column;
        align-items: stretch;
    }
    .breadcrumbs {
        gap: 0.3rem;
    }
    .shell-topbar,
    .hero-panel,
    .panel,
    .stat-card,
    .birthday-item,
    .section-header,
    .panel-header,
    .user-pill {
        min-width: 0;
        max-width: 100%;
    }
    .shell-topbar-actions { width: 100%; }
    .shell-topbar-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 0.6rem;
        flex-wrap: nowrap;
    }
    .topbar-language-select {
        width: auto;
    }
    .user-pill {
        align-items: center;
        justify-content: space-between;
        white-space: nowrap;
    }
    .hero-panel h2 {
        font-size: clamp(1.7rem, 8vw, 2.1rem);
        overflow-wrap: anywhere;
    }
    .hero-chip-row {
        min-width: 0;
    }
    .hero-chip {
        width: 100%;
        justify-content: center;
    }
    .dashboard-filter-bar,
    .dashboard-customizer-row,
    .dashboard-customizer-actions,
    .occupancy-header,
    .occupancy-meta {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
    .panel,
    .stat-card,
    .summary-card,
    .accordion-item,
    .invoice-sheet,
    .modal-card {
        overflow-x: clip;
    }
    .data-table {
        display: block;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table thead,
    .data-table tbody,
    .data-table tr {
        width: 100%;
    }
    .data-table th,
    .data-table td {
        white-space: nowrap;
    }
    .birthday-actions {
        align-self: stretch;
    }
    .birthday-actions summary,
    .birthday-actions > .btn {
        width: 100%;
    }
    .birthday-action-menu {
        left: 0;
        right: auto;
        min-width: min(220px, calc(100vw - 4rem));
        max-width: calc(100vw - 4rem);
    }
    .accordion-summary span:last-child { text-align: left; }
    .tab-nav-vertical { flex-direction: column; }
    .date-repeater-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .date-repeater-grid .date-field-date { grid-column: span 6; }
    .date-repeater-grid .date-field-teacher,
    .date-repeater-grid .date-field-time,
    .date-repeater-grid .date-field-studio,
    .date-repeater-grid .date-field-classroom { grid-column: span 3; }
    .payment-plan-repeater-grid {
        gap: 0.75rem;
    }
    .payment-plan-repeater-grid .plan-field {
        flex: 1 1 calc(50% - 0.75rem);
        max-width: none;
    }
    .date-repeater-grid .date-field-date .date-primary-row {
        grid-template-columns: 1fr 1fr;
    }
    .payment-plan-repeater-grid .plan-field-name {
        flex-basis: 100%;
    }
    .section-header > *,
    .panel-header > *,
    .birthday-item > * {
        min-width: 0;
    }
    .module-draft-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .date-repeater-grid .date-field,
    .payment-plan-repeater-grid .plan-field {
        grid-column: span 6;
    }
    .date-repeater-grid .date-field-date .date-primary-row {
        grid-template-columns: 1fr;
    }
    .main-panel,
    .panel,
    .stat-card {
        padding-inline: 0.9rem;
    }
    .birthday-action-menu {
        min-width: calc(100vw - 3rem);
        max-width: calc(100vw - 3rem);
    }
}

.detail-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.65rem;
    color: var(--text-muted, #5f524b);
}

.detail-list-numbered {
    padding-left: 1.25rem;
}

.code-card {
    border: 1px solid rgba(123, 88, 71, 0.12);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    overflow: auto;
}

.code-card pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.94rem;
    line-height: 1.65;
    color: #473a34;
}

@media (max-width: 1024px) and (orientation: portrait), (max-width: 932px) {
    .shell-topbar { padding-right: 4.8rem; }
    .main-panel { padding: 1rem; }
    .public-form-card {
        padding: 1.35rem;
        border-radius: 22px;
    }
    .public-form-brand {
        gap: 0.8rem;
    }
    .public-form-brand .brand-logo {
        width: 62px;
    }
    .public-form-actions .btn {
        width: 100%;
        min-width: 0;
    }
    .public-form-footer {
        align-items: stretch;
    }
    .public-form-actions {
        width: 100%;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    .sidebar, .topbar, .shell-topbar, .btn, .toolbar, .menu-toggle, .sidebar-overlay, .report-filters, .report-toolbar, .accordion-summary { display: none !important; }
    body { background: #fff; }
    .invoice-sheet { box-shadow: none; border: none; padding: 0; }

    body.print-report .app-shell,
    body.print-report .main-panel,
    body.print-report .content,
    body.print-report .content > .panel {
        display: block;
        padding: 0;
        margin: 0;
        border: none;
        box-shadow: none;
        background: #fff;
    }

    body.print-report .content .section-header,
    body.print-report .content .accordion-item {
        display: none !important;
    }

    body.print-report .content .accordion-item.print-active {
        display: block !important;
        border: none;
        background: #fff;
    }

    body.print-report .content .accordion-item.print-active .accordion-body {
        border-top: none;
        padding: 0;
    }

    body.print-report [data-print-report-target] {
        display: none !important;
    }

    body.print-report [data-print-report-target].print-active {
        display: block !important;
        width: 100%;
        max-width: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        margin: 0;
        background: #fff;
    }

    body.print-report [data-print-report-target].print-active .data-table th,
    body.print-report [data-print-report-target].print-active .data-table td {
        padding: 0.45rem 0.35rem;
        font-size: 0.78rem;
    }
}

.student-portal-body {
    margin: 0;
    background: #fdf8f4;
    color: #5c3f37;
}

.student-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    padding: 10px;
}

.student-main-shell {
    min-height: 0;
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    transition: grid-template-columns 0.25s ease;
}

.student-main-shell:has(.student-sidebar.collapsed) {
    grid-template-columns: 52px minmax(0, 1fr);
}

.student-sidebar {
    background: #D18B70;
    border-right: 1px solid rgba(209, 125, 99, 0.22);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: calc(100vh - var(--student-topbar-h, 60px) - 30px);
    overflow-y: auto;
    color: #fff;
    border-radius: 18px;
    transition: width 0.25s ease, min-width 0.25s ease, padding 0.25s ease;
}

.student-sidebar.collapsed {
    min-width: 52px;
    width: 52px;
    padding: 12px 6px;
    overflow: hidden;
}

.student-sidebar.collapsed .student-sidebar-profile,
.student-sidebar.collapsed .student-sidebar-nav,
.student-sidebar.collapsed .student-sidebar-footer {
    display: none;
}

.student-sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.student-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
}

.student-sidebar-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-sidebar-brand {
    padding-bottom: 12px;
}

.student-sidebar-logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.student-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.student-avatar,
.student-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ece0d6;
}

.student-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6a5b50;
}

.student-sidebar-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
}

.student-topbar-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.86);
}

.student-sidebar-name {
    font-weight: 800;
    color: #fff;
}

.student-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.student-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 13px;
    color: #6C473B;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-menu-main);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.student-sidebar-link:hover,
.student-sidebar-link.active {
    background: #F6E8DB;
    color: #6C473B;
    box-shadow: 0 8px 18px rgba(103, 49, 34, 0.26);
}

.student-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
    color: rgba(255, 255, 255, 0.96);
}

.student-exit-link {
    width: 100%;
    justify-content: center;
}

.student-workspace {
    padding: 24px 30px;
    display: grid;
    gap: 18px;
    align-content: start;
    position: relative;
    overflow: hidden;
    background: #fdf8f4;
    color: #6d4339;
    font-family: var(--font-page);
}

.student-workspace::before,
.student-workspace::after {
    content: none;
    position: absolute;
    left: -8%;
    right: -8%;
    height: 190px;
    border-radius: 999px;
    pointer-events: none;
}

.student-workspace::before {
    top: 120px;
    background: rgba(240, 202, 183, 0.3);
}

.student-workspace::after {
    bottom: -90px;
    background: rgba(236, 161, 129, 0.22);
}

.student-workspace > * {
    position: relative;
    z-index: 1;
}

.student-sidebar .btn {
    background: #965a44;
    border-color: #965a44;
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
}

.student-sidebar .btn:hover,
.student-sidebar .btn:focus-visible {
    background: #7f4c3a;
    border-color: #7f4c3a;
    color: #fff;
}

.student-workspace .btn {
    background: #965a44;
    border-color: #965a44;
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
}

.student-workspace .btn:hover,
.student-workspace .btn:focus-visible {
    background: #7f4c3a;
    border-color: #7f4c3a;
    color: #fff;
}

.preattendance-form {
    gap: 1.1rem;
}

.preattendance-card-grid {
    align-items: start;
}

.preattendance-switch {
    width: 100%;
    min-height: 52px;
    padding: 0.72rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    justify-content: space-between;
}

.preattendance-switch .switch-label {
    font-weight: 700;
    color: var(--text);
}

.preattendance-card [data-food-booking] .form-grid,
.preattendance-card [data-accommodation-booking] .form-grid,
.preattendance-card [data-pickup-booking] .form-grid {
    align-items: start;
}

.student-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
    background: #D18B70;
    border: 1px solid rgba(209, 125, 99, 0.22);
    color: #fff;
}

.student-topbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.student-topbar-brand-logo {
    width: clamp(180px, 40vw, 500px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.student-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.student-topbar-logout-form {
    margin: 0;
}

.student-topbar-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.15rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.student-topbar-logout-link svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-topbar-logout-link:hover,
.student-topbar-logout-link:focus-visible {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.student-topbar h1 {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 2.8rem);
    color: #fff;
}

.student-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.92rem;
}

.student-breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.student-dashboard-intro {
    display: grid;
    gap: 0.2rem;
    padding: 18px 20px;
}

.student-dashboard-intro-kicker {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b6e52;
}

.student-dashboard-intro h4 {
    margin: 0;
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    color: #6d4339;
}

.student-dashboard-intro h3 {
    margin: 0;
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    color: #8b6e52;
    font-weight: 700;
    font-family: "Salsa", cursive;
}

.student-portal-body .panel {
    background: rgba(255, 252, 249, 0.96);
    border: 1px solid #eeded2;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(126, 82, 61, 0.12);
}

.student-workspace .section-header {
    margin: 0 0 0.85rem;
}

.student-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
    gap: 1rem;
    align-items: end;
    overflow: hidden;
    background: var(--primary);
}

.student-dashboard-hero-copy h2 {
    margin: 0;
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
    color: #6d4339;
}

.student-dashboard-hero-copy p {
    margin: 0.5rem 0 0;
    color: #6d4339;
    font-size: 1.08rem;
}

.student-dashboard-hero-art {
    min-height: 130px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
}

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

.student-profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-dashboard-schedule-list,
.student-dashboard-community-list {
    display: grid;
    gap: 0.65rem;
}

.student-dashboard-schedule-item,
.student-dashboard-community-item {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: #fff8f2;
    border: 1px solid #f1ddd0;
}

.student-dashboard-schedule-item strong,
.student-dashboard-community-item strong {
    font-size: 1rem;
    color: #5b392f;
}

.student-dashboard-schedule-item span,
.student-dashboard-community-item span {
    color: #815f55;
    font-size: 0.92rem;
}

.student-dashboard-schedule-item.is-alert {
    background: #fff1ef;
    border-color: #f0c9c4;
}

.student-progress-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    margin-top: 0.25rem;
}

.student-progress-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

.student-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: rgba(76, 46, 37, 0.6);
}

.student-dashboard-community .btn {
    margin-top: 0.75rem;
}

.student-dashboard-courses {
    margin-top: 0.2rem;
}

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

.student-dashboard-mantra {
    text-align: center;
    background: var(--primary);
}

.student-dashboard-mantra h3 {
    margin: 0;
    font-size: clamp(1.8rem, 2.4vw, 2.6rem);
    color: #fff;
}

.student-dashboard-mantra p {
    margin: 0.5rem 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
}

.student-community-shell {
    display: grid;
    gap: 1rem;
}

.student-community-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.student-community-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(109, 67, 57, 0.3);
    color: #6d4339;
    font-weight: 700;
}

.student-community-tab.is-active {
    background: #6d4339;
    border-color: #6d4339;
    color: #fff;
}

.student-community-grid {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 1rem;
}

.student-community-sidebar {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.student-community-sidebar h4 {
    margin: 0;
    font-size: 1rem;
}

.student-community-filter-form,
.student-community-form {
    display: grid;
    gap: 0.7rem;
}

.student-community-filter-form select,
.student-community-form input,
.student-community-form select,
.student-community-form textarea {
    border-radius: 12px;
}

.student-community-form select[multiple] {
    min-height: 9rem;
}

.student-community-list {
    display: grid;
    gap: 0.5rem;
}

.student-community-list-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(109, 67, 57, 0.2);
    border-radius: 12px;
    background: #fff;
    color: #6d4339;
}

.student-community-list-item.is-active {
    background: rgba(109, 67, 57, 0.08);
    border-color: #6d4339;
}

.student-community-list-item small {
    color: #8b6e52;
}

.student-community-main {
    display: grid;
    gap: 0.9rem;
}

.student-community-thread {
    min-height: 260px;
    max-height: 520px;
    overflow: auto;
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid rgba(109, 67, 57, 0.18);
    border-radius: 14px;
    background: #fff;
}

.student-community-message {
    display: grid;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #ebddd5;
    background: #fffaf7;
}

.student-community-message.is-mine {
    border-color: rgba(172, 109, 83, 0.45);
    background: rgba(172, 109, 83, 0.12);
}

.student-community-message header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
}

.student-community-message header span {
    font-size: 0.8rem;
    color: #8b6e52;
}

.student-community-file-link {
    font-size: 0.9rem;
    color: #6d4339;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.student-dashboard-grid,
.student-financial-grid,
.student-profile-shell {
    display: grid;
    gap: 20px;
}

.student-dashboard-grid,
.student-profile-shell,
.student-financial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-profile-summary,
.student-course-header,
.student-lesson-header {
    grid-column: 1 / -1;
}

.student-highlight-card {
    padding: 18px;
    border-radius: 16px;
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    display: grid;
    gap: 6px;
}

.student-highlight-card p,
.student-highlight-card a {
    color: inherit;
}

.student-alert-panel {
    border-color: rgba(176, 56, 56, 0.2);
}

.student-alert-banner {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(176, 56, 56, 0.1);
    color: #a22d2d;
    font-weight: 700;
    margin-bottom: 14px;
}

.student-course-grid,
.student-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.student-courses-two-column {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.student-courses-panel,
.student-preattendance-panel {
    grid-column: auto;
}

.student-courses-panel,
.student-preattendance-panel .panel {
    height: 100%;
}

.student-preattendance-panel .preattendance-form {
    gap: 16px;
}

.student-course-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid #ecdacc;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(123, 80, 58, 0.1);
}

.student-course-card:nth-child(4n + 1) {
    background: #f6e8db;
    border-color: #e9d3bf;
}

.student-course-card:nth-child(4n + 2) {
    background: #f2e6db;
    border-color: #e6d1bd;
}

.student-course-card:nth-child(4n + 3) {
    background: #f7ebdf;
    border-color: #ead7c6;
}

.student-course-card:nth-child(4n + 4) {
    background: #f3e4da;
    border-color: #e7d0c1;
}

.student-course-status {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b6e52;
}

.student-course-meta,
.student-course-header-meta,
.student-readonly-grid,
.student-detail-list {
    display: grid;
    gap: 10px;
}

.student-course-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.student-course-header-meta {
    min-width: 180px;
    text-align: right;
}

.student-course-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.student-course-detail-right {
    display: grid;
    gap: 18px;
}

.student-qa-list {
    display: grid;
    gap: 14px;
}

.student-qa-item {
    border: 1px solid #e5e8ef;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.student-qa-question {
    padding: 14px 16px;
}

.student-qa-question strong {
    font-size: 0.85rem;
    color: #6C473B;
}

.student-qa-question p {
    margin: 6px 0 4px;
}

.student-qa-question small {
    color: var(--muted);
    font-size: 0.78rem;
}

.student-qa-answer {
    padding: 12px 16px;
    background: #f5f0ec;
    border-top: 1px solid #e5e8ef;
}

.student-qa-answer strong {
    font-size: 0.82rem;
    color: #D18B70;
}

.student-qa-answer p {
    margin: 4px 0 0;
}

.student-topic-stack,
.student-list-stack,
.student-calendar-list,
.student-lesson-list {
    display: grid;
    gap: 14px;
}

.student-topic-card {
    border-radius: 16px;
    border: 1px solid #e5e8ef;
    background: #fff;
    overflow: hidden;
}

.student-topic-card summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    font-weight: 800;
}

.student-topic-card summary::-webkit-details-marker {
    display: none;
}

.student-topic-description {
    padding: 0 18px 10px;
    color: #6f5d4e;
}

.student-lesson-row,
.student-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fffaf6;
    border: 1px solid #efdfd2;
    text-decoration: none;
    color: inherit;
}

.student-list-row p,
.student-lesson-row p {
    margin: 4px 0 0;
    color: #7a6856;
}

.student-list-row.active {
    border-color: #d2b28c;
    background: #fff1e2;
}

.dictionary-lists-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dictionary-main-three-column {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.dictionary-main-three-column .panel {
    height: 100%;
}

.personal-column-details .student-highlight-card {
    background: #fffdf9;
    border: 1px solid #e7d7c7;
    color: #5f4b38;
}

.personal-column-details .student-highlight-card strong {
    color: #654d38;
}

.personal-column-details .student-highlight-card p,
.personal-column-details .student-highlight-card a {
    color: #705943;
}

.personal-column-details .student-highlight-card .wysiwyg-output {
    background: #fffaf4;
    border: 1px solid #eddcc9;
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    color: #5f4b38;
}

.dictionary-layout-builder {
    border: 1px solid #ecdac7;
    border-radius: 14px;
    background: #fffdfb;
    padding: 0.85rem;
}

.dictionary-main-three-column input[type="text"],
.dictionary-main-three-column input[type="search"],
.dictionary-main-three-column textarea,
.dictionary-main-three-column select,
.dictionary-share-grid input[type="text"],
.dictionary-share-grid textarea,
.dictionary-share-grid select,
#dictionary-search-form input[type="text"],
#dictionary-search-form select,
.dictionary-word-modal-form-grid input[type="text"],
.dictionary-word-modal-form-grid textarea,
.dictionary-word-modal-form-grid select {
    background: #fffdf9;
    border: 1px solid #e7d7c7;
    color: #5f4b38;
}

.dictionary-main-three-column input::placeholder,
.dictionary-main-three-column textarea::placeholder,
.dictionary-share-grid input::placeholder,
.dictionary-share-grid textarea::placeholder,
#dictionary-search-form input::placeholder,
.dictionary-word-modal-form-grid input::placeholder,
.dictionary-word-modal-form-grid textarea::placeholder {
    color: #9a836c;
}

.dictionary-main-three-column input:focus,
.dictionary-main-three-column textarea:focus,
.dictionary-main-three-column select:focus,
.dictionary-share-grid input:focus,
.dictionary-share-grid textarea:focus,
.dictionary-share-grid select:focus,
#dictionary-search-form input:focus,
#dictionary-search-form select:focus,
.dictionary-word-modal-form-grid input:focus,
.dictionary-word-modal-form-grid textarea:focus,
.dictionary-word-modal-form-grid select:focus {
    border-color: #cda989;
    box-shadow: 0 0 0 3px rgba(205, 169, 137, 0.18);
}

.dictionary-layout-builder-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.65rem;
    align-items: end;
    margin-top: 0.55rem;
}

.dictionary-layout-first-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.dictionary-layout-row-label {
    margin: 0;
}

.dictionary-layout-row-label > span {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.78rem;
    color: #6b7280;
    letter-spacing: 0.01em;
}

.dictionary-layout-builder .switch-toggle {
    margin: 0;
    align-self: end;
    gap: 0.38rem;
}

.dictionary-layout-builder .switch-slider {
    width: 36px;
    height: 20px;
}

.dictionary-layout-builder .switch-slider::after {
    width: 14px;
    height: 14px;
}

.dictionary-layout-builder .switch-toggle input[type="checkbox"]:checked + .switch-slider::after {
    transform: translateX(16px);
}

.dictionary-layout-builder .switch-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #5b4b3a;
}

.dictionary-layout-first-row .switch-toggle input[disabled] + .switch-slider {
    opacity: 0.85;
    cursor: default;
}

.dictionary-row-order-card {
    margin-bottom: 0.2rem;
}

.dictionary-row-order-list {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.45rem;
}

.dictionary-row-order-list-inline {
    margin-top: 0.7rem;
}

.dictionary-row-order-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.48rem 0.62rem;
    border: 1px solid #e6d7c8;
    border-radius: 10px;
    background: #fff;
    cursor: grab;
    user-select: none;
}

.dictionary-row-order-item > span:nth-child(2) {
    flex: 1;
}

.dictionary-row-order-actions {
    margin-left: auto;
    display: inline-flex;
    gap: 0.35rem;
}

.dictionary-row-order-actions .btn {
    min-width: 46px;
    padding: 0.26rem 0.5rem;
}

.dictionary-row-order-item.is-dragging {
    opacity: 0.58;
}

.dictionary-row-order-item.is-drop-target {
    border-color: #c79d70;
    background: #fff6ed;
}

.dictionary-row-order-grip {
    color: #9c7a57;
    font-weight: 700;
    line-height: 1;
}

.dictionary-layout-modal-row {
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    border: 1px solid #e6d7c8;
    border-radius: 10px;
    background: #fff;
    padding: 0.45rem 0.55rem;
    margin-top: 0;
    align-items: center;
}

.dictionary-layout-modal-row .switch-toggle {
    align-self: center;
}

.dictionary-layout-modal-row .dictionary-layout-row-label {
    align-self: stretch;
}

.dictionary-layout-modal-row .dictionary-layout-row-label > span {
    font-size: 0.76rem;
}

.dictionary-row-mandatory-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 0.65rem;
    border-radius: 10px;
    border: 1px solid #ead9c7;
    background: #fff7ee;
    font-weight: 700;
    color: #8a6440;
}

.dictionary-row-lock-note {
    display: block;
    margin-top: 0.2rem;
}

.dictionary-share-student-list {
    min-height: 22rem;
}

@media (max-width: 900px) {
    .dictionary-layout-modal-row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .dictionary-layout-modal-row .dictionary-row-order-actions {
        margin-left: 0;
        justify-content: flex-start;
    }
}

.dictionary-share-list-actions {
    margin: 0.3rem 0 0.45rem;
    justify-content: flex-start;
    gap: 0.45rem;
}

.dictionary-share-modal-card {
    max-width: min(1100px, 96vw);
}

.dictionary-share-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1rem;
    padding: 1rem 1.2rem 1.2rem;
    align-items: start;
}

.dictionary-share-left {
    display: grid;
    gap: 0.8rem;
}

.dictionary-share-right {
    border: 1px solid #ecdac7;
    border-radius: 12px;
    background: #fffdfb;
    padding: 0.75rem;
    max-height: 70vh;
    overflow: auto;
}

.dictionary-share-right h4 {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
}

.dictionary-share-existing-list {
    display: grid;
    gap: 0.55rem;
}

.dictionary-share-existing-item {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
}

.dictionary-share-existing-actions {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.35rem;
}

.dictionary-share-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.dictionary-share-chip-everyone {
    background: #fee2e2;
    color: #b91c1c;
}

.dictionary-share-chip-course {
    background: #ede9fe;
    color: #5b21b6;
}

.dictionary-share-chip-student {
    background: #dbeafe;
    color: #1d4ed8;
}

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

.dictionary-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.dictionary-row-link {
    flex: 1;
}

.dictionary-share-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.dictionary-share-tag-in {
    background: #dbeafe;
    color: #1d4ed8;
}

.dictionary-share-tag-out {
    background: #fee2e2;
    color: #b91c1c;
}

.dictionary-share-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #e5d2be;
    background: #fff4e7;
}

.dictionary-share-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1180px) {
    .dictionary-lists-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dictionary-main-three-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dictionary-common-panel {
        grid-column: 1 / -1;
    }
}

.personal-dictionary-workspace {
    position: relative;
    overflow: visible;
}

.personal-dictionary-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.86fr) minmax(420px, 2.04fr) 200px;
    gap: 16px;
    align-items: start;
    position: relative;
}

#dictionary-search-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.15fr) minmax(0, 1.85fr);
    gap: 10px;
    align-items: end;
}

.dictionary-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.personal-column {
    border-radius: 16px;
    border: 1px solid #ecdac7;
    background: #fffdfb;
    padding: 14px;
}

.personal-column h3 {
    margin-top: 0;
}

.personal-column-words .student-list-stack {
    max-height: 70vh;
    overflow: auto;
}

.personal-column-keyboard {
    position: relative;
    width: 100%;
    padding: 14px;
    overflow: visible;
    align-self: stretch;
    min-height: 100%;
}

.personal-keyboard-edge-toggle {
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 76px;
    border-radius: 999px;
    border: 2px solid #cda989;
    background: #fff4e8;
    color: #6a4835;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 8px 16px rgba(60, 36, 22, 0.14);
}

.personal-keyboard-edge-toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.personal-keyboard-toggle {
    border: 1px solid #d4b89a;
    background: #fff4e8;
    color: #684833;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 700;
}

.personal-keyboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.personal-keyboard-editor-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 0;
    flex-wrap: nowrap;
    justify-content: center;
    order: 2;
    margin-top: auto;
    padding-top: 10px;
    align-items: center;
}

.personal-keyboard-editor-actions .btn {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    justify-content: center;
    border-radius: 12px;
}

.personal-keyboard-body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.personal-keyboard-vertical {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
    order: 1;
}

.personal-keyboard-vertical .btn {
    width: 100%;
    justify-content: center;
    min-height: 56px;
    aspect-ratio: 1 / 1;
    padding: 0 6px;
}

.personal-keyboard-vertical .btn.is-placeholder {
    border-style: dashed;
    opacity: 0.78;
}

.personal-keyboard-vertical .btn.is-editing {
    border-color: #b77750;
    box-shadow: inset 0 0 0 1px rgba(183, 119, 80, 0.25);
}

.personal-column-keyboard h3,
.personal-column-keyboard label,
.personal-column-keyboard .table-subtext {
    white-space: nowrap;
}

.personal-column-keyboard.is-collapsed .personal-keyboard-body {
    display: none;
}

.personal-dictionary-workspace.is-keyboard-collapsed .personal-column-keyboard {
    padding: 8px 0;
    overflow: visible;
}

.personal-dictionary-workspace.is-keyboard-collapsed .personal-column-keyboard h3 {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
}

.personal-dictionary-workspace.is-keyboard-collapsed .personal-keyboard-edge-toggle svg {
    transform: rotate(180deg);
}

.dictionary-word-modal-card {
    width: min(1200px, calc(100vw - 2rem));
}

.dictionary-word-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 14px;
    align-items: start;
}

.dictionary-word-modal-form-grid {
    display: grid;
    gap: 12px;
}

.dictionary-modal-keyboard {
    border: 1px solid #ecdac7;
    border-radius: 14px;
    background: #fffdfb;
    padding: 14px;
    position: sticky;
    top: 0;
    width: 200px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.dictionary-modal-keyboard h3 {
    margin: 0;
}

.dictionary-word-modal-layout [data-taxonomy-custom][hidden] {
    display: none !important;
}

.personal-column-keyboard .personal-keyboard-vertical .btn,
.dictionary-modal-keyboard .personal-keyboard-vertical .btn,
.personal-column-keyboard .personal-keyboard-editor-actions .btn,
.dictionary-modal-keyboard .personal-keyboard-editor-actions .btn {
    background: #7a4a36;
    color: #f7e7dc;
    border-color: #7a4a36;
}

.personal-column-keyboard .personal-keyboard-vertical .btn:hover,
.dictionary-modal-keyboard .personal-keyboard-vertical .btn:hover,
.personal-column-keyboard .personal-keyboard-editor-actions .btn:hover,
.dictionary-modal-keyboard .personal-keyboard-editor-actions .btn:hover {
    background: #663c2b;
    border-color: #663c2b;
}

.personal-column-keyboard .personal-keyboard-vertical .btn.is-placeholder,
.dictionary-modal-keyboard .personal-keyboard-vertical .btn.is-placeholder {
    background: #94614b;
}

@media (min-width: 1321px) {
    .personal-dictionary-workspace.is-keyboard-collapsed .personal-dictionary-grid {
        grid-template-columns: minmax(220px, 0.86fr) minmax(420px, 2.14fr) 24px;
    }
}

@media (max-width: 1320px) {
    .personal-dictionary-grid {
        grid-template-columns: minmax(200px, 0.85fr) minmax(320px, 1.8fr) 184px;
    }

    .personal-dictionary-workspace.is-keyboard-collapsed .personal-dictionary-grid {
        grid-template-columns: minmax(200px, 0.85fr) minmax(320px, 1.8fr) 24px;
    }
}

@media (max-width: 1100px) {
    .personal-dictionary-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 168px;
    }

    .personal-dictionary-workspace.is-keyboard-collapsed .personal-dictionary-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 24px;
    }
}

.student-birthday-name-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.student-birthday-name-btn:hover {
    text-decoration: underline;
}

.student-birthday-row {
    cursor: pointer;
}

.student-birthday-row:hover {
    border-color: #d8bea9;
    background: #fff5ef;
}

.student-birthday-row:focus-visible {
    outline: 2px solid #965a44;
    outline-offset: 2px;
}

.student-birthday-modal-shell {
    z-index: 4010;
    place-items: center center;
    padding: 1rem;
    overflow: auto;
}

.student-birthday-modal-shell .modal-card {
    width: min(760px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
}

.student-list-row-alert {
    background: rgba(176, 56, 56, 0.08);
}

.student-profile-hero {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.student-readonly-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.student-readonly-grid div,
.student-detail-list div {
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #eceff5;
    display: grid;
    gap: 4px;
}

.student-readonly-grid span,
.student-detail-list span {
    font-size: 0.84rem;
    color: #8b6e52;
}

.student-embedded-presentation {
    display: grid;
    gap: 14px;
}

.student-embedded-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #0f1012;
}

.student-embedded-slide {
    position: absolute;
    inset: 0;
    display: none;
    padding: 48px 56px;
    background: linear-gradient(180deg, rgba(18, 20, 26, 0.94), rgba(33, 36, 47, 0.98));
    color: #fff;
}

.student-embedded-slide.is-active {
    display: block;
}

.student-embedded-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.student-resource-card {
    border-radius: 16px;
    border: 1px solid #e5e8ef;
    background: #ffffff;
    padding: 18px;
}

.student-document-frame {
    width: 100%;
    min-height: 720px;
    border: 0;
    border-radius: 16px;
    background: #fff;
}

.student-calendar-day {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #e5e8ef;
    background: #ffffff;
}

.student-calendar-day > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

@media (max-width: 1200px) {
    .student-dashboard-main,
    .student-dashboard-secondary,
    .student-courses-two-column,
    .student-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .student-courses-two-column {
        grid-template-columns: 1fr;
    }

    .dictionary-main-three-column {
        grid-template-columns: 1fr;
    }

    .dictionary-layout-builder-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0.45rem;
    }

    .dictionary-layout-builder .switch-toggle {
        align-self: start;
    }

    .dictionary-common-panel {
        grid-column: auto;
    }

    .student-courses-panel,
    .student-preattendance-panel {
        grid-column: auto;
    }

    .student-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(110, 82, 54, 0.14);
    }

    .student-dashboard-grid,
    .student-profile-shell,
    .student-financial-grid {
        grid-template-columns: 1fr;
    }

    .student-dashboard-main,
    .student-dashboard-secondary,
    .student-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .student-community-grid {
        grid-template-columns: 1fr;
    }

    .student-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .student-topbar-brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .preattendance-card-grid,
    .preattendance-card [data-food-booking] .form-grid,
    .preattendance-card [data-accommodation-booking] .form-grid,
    .preattendance-card [data-pickup-booking] .form-grid {
        grid-template-columns: 1fr;
    }

    .student-topbar-brand-logo {
        max-width: min(84vw, 320px);
    }

    .student-dashboard-hero-art {
        min-height: 100px;
    }

    #dictionary-search-form {
        grid-template-columns: 1fr;
    }

    .dictionary-filter-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .personal-column-keyboard {
        grid-column: 1 / -1;
        position: absolute;
        right: 0;
        top: 0;
        width: min(320px, calc(100vw - 1rem));
        max-height: calc(100vh - 120px);
        overflow: auto;
        z-index: 24;
        box-shadow: 0 20px 38px rgba(28, 18, 10, 0.2);
        transition: right 0.22s ease;
    }

    .personal-dictionary-workspace.is-keyboard-collapsed .personal-column-keyboard {
        right: -292px;
    }

    .personal-dictionary-workspace.is-keyboard-collapsed .personal-column-keyboard .personal-keyboard-edge-toggle {
        left: -10px;
    }

    .personal-dictionary-workspace.is-keyboard-collapsed .personal-column-keyboard .personal-keyboard-body {
        display: none;
    }
}

@media (max-width: 680px) {
    .dictionary-filter-row {
        grid-template-columns: 1fr;
    }

    .personal-dictionary-grid {
        grid-template-columns: 1fr;
    }

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

    .dictionary-modal-keyboard {
        position: static;
    }
}

/* Short-viewport fallback: prefer document scrolling over sidebar clipping. */
@media (max-height: 760px) {
    .app-shell,
    .student-shell {
        min-height: auto;
    }

    .workspace-shell,
    .student-main-shell {
        align-items: start;
    }

    .sidebar,
    .student-sidebar {
        height: auto;
        min-height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .nav-parent,
    .nav-submenu a,
    .student-sidebar-link {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

@media (max-width: 1024px) and (max-height: 760px) {
    .sidebar {
        min-height: calc(100vh + env(safe-area-inset-bottom));
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    body.menu-open {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* ===== Online Test Question Builder ===== */
.ot-type-panel { margin-top: 0.25rem; }

/* ===== Exam Form Layout ===== */
.exam-create-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 380px);
    align-items: start;
}
.exam-form-sidebar {
    position: sticky;
    top: 1rem;
}
.exam-form-sidebar h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}
.exam-sidebar-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.exam-sidebar-options .checkbox-label {
    font-size: 0.9rem;
}
span.required {
    color: var(--primary-dark, #b08d57);
    font-weight: 700;
    margin-left: 2px;
}
@media (max-width: 900px) {
    .exam-create-grid {
        grid-template-columns: 1fr;
    }
    .exam-form-sidebar {
        position: static;
    }
}
.ot-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.ot-options-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary, #3e2f1c);
}
.ot-options-label small {
    font-weight: 400;
    color: var(--text-secondary, #7a6a55);
}
.ot-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ot-option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ot-option-row input[type="radio"],
.ot-option-row input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.ot-option-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(110, 82, 54, 0.22);
    border-radius: 6px;
    font-size: 0.92rem;
    background: var(--bg-input, #fff);
}
.ot-option-input:focus {
    outline: none;
    border-color: var(--color-primary, #b08d57);
    box-shadow: 0 0 0 2px rgba(176, 141, 87, 0.15);
}
.ot-tf-row {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0;
}
.ot-tf-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    cursor: pointer;
}
.ot-hint {
    color: var(--text-secondary, #7a6a55);
    font-size: 0.88rem;
    margin: 0.25rem 0 0.5rem;
}
.ot-blank-answers {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.25rem;
}
.ot-blank-answer-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ot-blank-num {
    font-weight: 600;
    min-width: 1.5rem;
    text-align: right;
    color: var(--text-primary, #3e2f1c);
}
