:root {
    --yellow: #ffdd00;
    --yellow-soft: #fcea10;
    --graphite: #3c3c3b;
    --gray: #dad9d0;
    --line: #d5d3ca;
    --dark: #000000;
    --sidebar-bg-1: #3c3c3b;
    --sidebar-bg-2: #000000;
    --content-bg: #f3f1e8;

    --sidebar-width: 220px;
    --sidebar-collapsed: 62px;
    --header-height: 56px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
}

.crm-body {
    background: linear-gradient(180deg, #f6f4ec 0%, #f0ede3 100%);
    font-family: Cera, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #000;
}

.crm-body.sidebar-mini {
    background: linear-gradient(180deg, #f6f4ec 0%, #f0ede3 100%) !important;
}

.crm-wrapper {
    min-height: 100vh;
}

.main-header.crm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1200;
    display: flex;
    align-items: stretch;
    background: linear-gradient(90deg, #333333 0%, #232323 55%, #151515 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.main-header .logo {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    background: transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 14px;
    transition: width 0.25s ease;
    overflow: hidden;
}

.skin-dark-blue .main-header .logo,
.skin-dark-blue .main-header .navbar {
    background: transparent !important;
}

.main-header.crm-header .logo,
.main-header.crm-header .navbar {
    background-color: transparent !important;
    background-image: none !important;
}

.main-header .logo-mini,
.main-header .logo-lg {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
}

.main-header .logo-mini {
    display: none;
}

.brand-logo-full {
    height: 33px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.brand-logo-mini {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.main-header .crm-sidebar-toggle {
    width: 34px;
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border-right: 0;
    padding: 0;
}

.main-header.crm-header .crm-sidebar-toggle {
    background: transparent !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
}

.main-header .crm-sidebar-toggle::before,
.main-header .crm-sidebar-toggle::after {
    content: none !important;
    display: none !important;
}

.main-header .crm-sidebar-toggle:hover,
.main-header .crm-sidebar-toggle:focus {
    background: transparent;
    text-decoration: none;
    color: #fff;
}

.toggle-pill {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.main-header .crm-sidebar-toggle .icon-bar {
    display: block;
    width: 9px;
    height: 2px;
    border-radius: 8px;
    background: #fff;
}

.crm-navbar {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 14px;
    margin-left: 0;
    border: 0;
    background: transparent;
}

.crm-navbar-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
    line-height: 1;
}

.main-sidebar.crm-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1100;
    overflow: hidden;
    transition: width 0.25s ease;
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 62%, #0b0b0b 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.main-sidebar .sidebar {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 10px;
}

.main-sidebar .sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-sidebar .sidebar-menu > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 9px 12px;
    margin: 4px 8px;
    border-radius: 9px;
    transition: background 0.18s ease, color 0.18s ease;
}

.main-sidebar .sidebar-menu > li > a > span:last-child {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-size: 16px;
    opacity: 1;
    visibility: visible;
}

#crmBody .main-sidebar .sidebar-menu > li > a > .menu-label {
    display: inline-block;
    width: auto;
    color: var(--gray);
    font-size: 16px;
    line-height: 1.2;
    text-indent: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#crmBody:not(.crm-sidebar-collapsed) .main-sidebar .sidebar-menu > li > a > .menu-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    position: static !important;
    color: var(--gray) !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}

#crmBody:not(.crm-sidebar-collapsed) .main-sidebar .sidebar-menu > li > a {
    justify-content: flex-start !important;
}

#crmBody:not(.crm-sidebar-collapsed) .main-sidebar .sidebar-menu > li.active > a > .menu-label {
    color: var(--yellow) !important;
}

#crmBody.sidebar-mini.sidebar-collapse:not(.crm-sidebar-collapsed) .main-sidebar .sidebar-menu > li > a > .menu-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    position: static !important;
    text-indent: 0 !important;
    clip: auto !important;
    clip-path: none !important;
}

.main-sidebar .sidebar-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.main-sidebar .sidebar-menu > li.active > a {
    background: rgba(255, 255, 255, 0.18);
    color: var(--yellow);
}

.menu-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255, 221, 0, 0.08);
    border: 1px solid rgba(255, 221, 0, 0.28);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background 0.2s ease;
}

.menu-icon-svg {
    width: 15px;
    height: 15px;
    display: block;
    opacity: 0.95;
}

.main-sidebar .sidebar-menu > li > a:hover .menu-icon {
    background: rgba(255, 221, 0, 0.16);
    border-color: rgba(255, 221, 0, 0.42);
}

.main-sidebar .sidebar-menu > li.active > a .menu-icon {
    background: rgba(255, 221, 0, 0.2);
    border-color: rgba(255, 221, 0, 0.5);
}

.content-wrapper.crm-content-wrapper {
    min-height: 100vh;
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    padding: 10px 10px 14px;
    transition: margin-left 0.25s ease;
    background: linear-gradient(180deg, #f6f4ec 0%, #eeeadf 100%);
}

.page-title-row {
    margin-bottom: 8px;
}

.page-title-row .col-sm-9 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.content-wrapper {
    background: linear-gradient(180deg, #f6f4ec 0%, #efebdf 100%) !important;
}

.crm-page-header {
    margin-bottom: 12px;
}

.crm-content-wrapper a:not(.btn) {
    color: var(--graphite);
}

.crm-content-wrapper a:not(.btn):hover,
.crm-content-wrapper a:not(.btn):focus {
    color: #000;
}

.org-name {
    margin: 0;
    font-size: clamp(20px, 1.45vw, 30px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #000;
}

.panel {
    background: #fff;
    border: 1px solid #dfddd4;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.035);
    margin-bottom: 12px;
}

.panel-body {
    padding: 11px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.panel-header h2,
.panel-header h3 {
    margin: 0;
    color: #2f3140;
    font-size: clamp(17px, 1.15vw, 21px);
    line-height: 1.12;
    font-weight: 700;
}

.page-title {
    margin: 0;
    font-size: clamp(17px, 1.15vw, 22px);
    line-height: 1.12;
    font-weight: 700;
    color: #2f3140;
}

.btn {
    border-radius: 7px;
    border: 1px solid transparent;
    text-decoration: none;
    padding: 7px 12px;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn:hover,
.btn:focus {
    text-decoration: none;
}

.btn-primary {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #000;
    font-weight: 700;
}

.btn-dark {
    background: #36393d;
    border-color: #36393d;
    color: #fff;
    font-weight: 600;
}

.btn-light {
    background: #fff;
    border-color: #cecdc4;
    color: #444;
    font-weight: 500;
}

.students-filters {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.filter-row input:not([type="checkbox"]):not([type="radio"]),
.filter-row select,
.filters input:not([type="checkbox"]):not([type="radio"]),
.filters select,
.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid #cfcec5;
    background: #fff;
    padding: 7px 9px;
    color: #373844;
    font-size: 13px;
}

.filter-row input:not([type="checkbox"]):not([type="radio"]),
.filter-row select {
    min-height: 37px;
    font-size: 13px;
}

.form-field textarea {
    min-height: 86px;
    resize: vertical;
}

.form-field input[type="checkbox"],
.form-field input[type="radio"],
.topic-active-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.filters {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 220px auto;
    gap: 10px;
    margin-bottom: 12px;
}

.locations-filters {
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
}

.actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
}

.students-filters .actions-row {
    overflow: visible;
}

.left-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.columns-menu {
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
}

.columns-popup {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 320px;
    max-width: min(420px, 92vw);
    max-height: 390px;
    overflow-y: auto;
    border: 1px solid #d2d0c7;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    z-index: 1300;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.columns-popup.open {
    display: block;
}

.columns-popup label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.25;
    margin-bottom: 7px;
    cursor: pointer;
}

.columns-popup input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    flex: 0 0 16px;
}

.quick-actions {
    color: var(--graphite);
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 10px;
}

.quick-actions a {
    color: var(--graphite);
    text-decoration: none;
    font-weight: 500;
}

.quick-actions a:hover {
    text-decoration: underline;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table-wrap::-webkit-scrollbar {
    height: 11px;
}

.table-wrap::-webkit-scrollbar-track {
    background: #e9e8e2;
    border-radius: 99px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: #bdbcb5;
    border-radius: 99px;
}

.students-table-wrap {
    border: 1px solid #d8d7ce;
    border-radius: 9px;
    background: #fff;
}

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

th,
td {
    border-bottom: 1px solid #dddcd4;
    text-align: left;
    padding: 7px 8px;
    vertical-align: top;
}

th {
    background: #f4f4f2;
    color: #3a3d4b;
    font-size: 13px;
    font-weight: 700;
}

td {
    color: #31313f;
    font-size: 12px;
    line-height: 1.32;
}

.students-table {
    min-width: 1100px;
}

.students-table th,
.students-table td {
    white-space: nowrap;
}

.students-table .col-name,
.students-table .col-group-name,
.students-table .col-description,
.students-table .col-teacher,
.students-table .col-parent-name,
.students-table .col-created-by {
    white-space: normal;
    min-width: 170px;
}

.muted {
    color: #7b7d86;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    color: #3b3b3b;
    background: #e8e8e2;
}

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

.card {
    border: 1px solid #d8d7ce;
    border-radius: 12px;
    background: #fff;
    padding: 13px;
}

.card h3 {
    margin: 0 0 8px;
}

.dashboard-panel .panel-body {
    padding: 14px;
}

.dashboard-header {
    margin-bottom: 10px;
}

.dashboard-subtitle {
    margin: 4px 0 0;
    color: #5d6171;
    font-size: 14px;
    line-height: 1.35;
}

.dashboard-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d4d2c8;
    background: #f8f8f5;
    color: #3b3e4b;
    font-size: 13px;
    line-height: 1;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.dashboard-kpi-grid--compact {
    margin-top: 10px;
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(260px, 1fr);
    gap: 10px;
}

.dashboard-trend-card {
    border: 1px solid #d8d7ce;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    min-width: 0;
}

.dashboard-trend-card__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #1f2533;
}

.dashboard-trend-card__stats {
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dashboard-trend-card__value {
    margin: 0;
    font-size: clamp(36px, 3.2vw, 58px);
    line-height: 1;
    font-weight: 500;
    color: #262c3a;
}

.dashboard-trend-card__meta p {
    margin: 0;
    font-size: 14px;
    line-height: 1.25;
    color: #1f2533;
}

.dashboard-trend-card__chart {
    display: block;
    width: 100%;
    height: 60px;
    margin-top: 8px;
}

.dashboard-ops-card {
    border: 1px solid #d8d7ce;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    min-width: 0;
    position: relative;
}

.dashboard-ops-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 7px;
    padding: 5px 9px;
    background: #f2f3f6;
    font-size: 13px;
    color: #2d3242;
}

.dashboard-ops-section {
    padding-top: 4px;
}

.dashboard-ops-section + .dashboard-ops-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e1da;
}

.dashboard-ops-section h4 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 800;
    color: #1f2533;
    letter-spacing: 0.03em;
}

.dashboard-ops-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 6px;
}

.dashboard-ops-row--link {
    text-decoration: none;
    border-radius: 8px;
    padding: 3px 5px;
    margin: 0 -5px 4px;
}

.dashboard-ops-row--link:hover,
.dashboard-ops-row--link:focus {
    background: #f5f4ef;
    text-decoration: none;
}

.dashboard-ops-row span {
    font-size: 14px;
    line-height: 1.25;
    color: #1f2533;
}

.dashboard-ops-row strong {
    font-size: 15px;
    line-height: 1;
    color: #1f2533;
}

.dashboard-kpi {
    border: 1px solid #d8d7ce;
    border-radius: 9px;
    background: #fff;
    padding: 8px 9px;
}

.dashboard-kpi__label {
    margin: 0;
    color: #626677;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.dashboard-kpi__value {
    margin: 5px 0 3px;
    color: #2f3140;
    font-size: clamp(18px, 1.7vw, 24px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
}

.dashboard-kpi__meta {
    margin: 0;
    color: #707384;
    font-size: 12px;
    line-height: 1.3;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 10px;
}

.dashboard-card {
    border: 1px solid #d8d7ce;
    border-radius: 9px;
    background: #fff;
    min-width: 0;
    overflow: hidden;
}

.dashboard-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 10px 8px;
    border-bottom: 1px solid #e5e4de;
}

.dashboard-card__header h3 {
    margin: 0;
    color: #2f3140;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-table {
    margin-bottom: 0;
}

.dashboard-table th,
.dashboard-table td {
    padding: 6px 7px;
    font-size: 12px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

.pagination a {
    color: var(--graphite);
    text-decoration: none;
}

.message {
    background: #fff3c2;
    border: 1px solid #ffd869;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    color: #47403a;
}

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

.two-cols {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field label {
    font-size: 14px;
    color: #3a3a45;
    font-weight: 600;
}

.full-row {
    grid-column: 1 / -1;
}

.form-divider {
    border-top: 1px solid #d8d7ce;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #3a3a45;
}

.form-actions {
    margin-top: 6px;
}

.form-errors ul,
.field-error ul {
    margin: 0;
    padding-left: 18px;
    color: #9f1515;
}

.group-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.group-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.group-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.group-chip.default {
    color: #fff;
    background: #61646f;
}

.group-chip.success {
    color: #fff;
    background: #68a657;
}

.group-chip.warning {
    color: #fff;
    background: #f0ad4e;
}

.group-chip.info {
    color: #fff;
    background: #4d87bf;
}

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

.group-meta-card {
    border: 1px solid #d8d7ce;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    min-width: 0;
}

.group-stats-list {
    display: grid;
    gap: 7px;
}

.group-stats-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px;
    align-items: start;
}

.group-stats-row .label {
    font-size: 12px;
    color: #7b7d86;
    background: transparent;
    padding: 0;
}

.group-stats-row .value {
    font-size: 15px;
    color: #2e3140;
}

.group-meta-card h4 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.2;
    color: var(--graphite);
}

.group-meta-card .muted-title {
    margin: 0 0 8px;
    font-size: 13px;
    color: #8b8c94;
}

.group-content__header {
    margin-top: 12px;
}

.group-tabs {
    border-bottom: 0;
}

.group-tabs > li > a {
    border: 0;
    border-radius: 8px 8px 0 0;
    color: var(--graphite);
    font-size: 17px;
    font-weight: 500;
    padding: 8px 12px;
}

.group-tabs > li.active > a,
.group-tabs > li.active > a:hover,
.group-tabs > li.active > a:focus {
    color: var(--graphite);
    background: #fff;
    border: 0;
}

.group-tab-panel {
    margin-top: 0;
}

.group-tab-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.lesson-history-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #474b5b;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-block;
}

.lesson-history {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 300px;
    align-items: center;
}

.lesson-history-point {
    display: inline-flex;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid transparent;
    flex: 0 0 16px;
    cursor: default;
    user-select: none;
}

.lesson-history-point.status-present,
.legend-dot.present {
    background: #67b35a;
    border-color: #569a4a;
}

.lesson-history-point.status-absent,
.legend-dot.absent {
    background: #cd5d57;
    border-color: #b14a45;
}

.lesson-history-point.status-pending,
.legend-dot.pending {
    background: #e6e8ef;
    border-color: #cfd4de;
}

.inline-lesson-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-lesson-form select {
    min-width: 220px;
    max-width: 360px;
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid #cfcec5;
    background: #fff;
    padding: 6px 10px;
    font-size: 14px;
    color: #373844;
}

.inline-lesson-form input[type="datetime-local"] {
    min-width: 220px;
    max-width: 260px;
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid #cfcec5;
    background: #fff;
    padding: 6px 10px;
    font-size: 14px;
    color: #373844;
}

.lesson-inline-select {
    min-width: 220px;
    max-width: 360px;
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid #cfcec5;
    background: #fff;
    padding: 6px 10px;
    font-size: 14px;
    color: #373844;
}

.schedule-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(15, 18, 34, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.schedule-modal__card {
    width: min(680px, 92vw);
    background: #fff;
    border: 1px solid #d8d7ce;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.schedule-modal__card h3 {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.1;
    color: #2f3140;
}

.schedule-modal__card p {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #3a3d4b;
}

.schedule-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.lessons-topics-table td {
    vertical-align: middle;
}

.topic-row-form {
    width: 100%;
}

.topic-row-grid {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.2fr) minmax(170px, 1fr) minmax(170px, 1fr) 96px 100px;
    gap: 6px;
    align-items: start;
}

.topic-row-grid input[type="text"],
.topic-row-grid input[type="url"],
.topic-row-grid textarea {
    width: 100%;
    min-height: 34px;
    border: 1px solid #cfcec5;
    border-radius: 8px;
    padding: 6px 8px;
    background: #fff;
    color: #373844;
    font-size: 13px;
}

.topic-row-grid textarea {
    min-height: 50px;
    resize: vertical;
}

.topic-active-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #323544;
    margin: 7px 0 0;
}

.topic-url-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topic-url-link {
    font-size: 12px;
    line-height: 1;
    color: var(--graphite);
    text-decoration: underline;
    align-self: flex-start;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 8px;
    line-height: 1.25;
}

.is-hidden {
    display: none !important;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 14% -6%, rgba(255, 221, 0, 0.22) 0%, rgba(255, 221, 0, 0) 42%),
        linear-gradient(180deg, #f5f2e6 0%, #ece7db 100%);
    font-family: Cera, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.auth-card {
    width: min(460px, 92vw);
    border-radius: 14px;
    border: 1px solid #d8d7ce;
    background: #fff;
    padding: 22px;
    box-shadow: 0 16px 32px rgba(25, 28, 57, 0.08);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.auth-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex: 0 0 auto;
}

.auth-brand-wordmark {
    height: 28px;
    width: auto;
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 34px;
}

.auth-subtitle {
    margin: 0 0 14px;
    color: #666b7a;
}

.auth-form {
    display: grid;
    gap: 8px;
}

.full {
    width: 100%;
    margin-top: 6px;
}

.crm-sidebar-collapsed .main-header .logo {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
    padding: 0;
    justify-content: center;
}

.crm-sidebar-collapsed .main-header .logo-lg {
    display: none;
}

.crm-sidebar-collapsed .main-header .logo-mini {
    display: flex;
    justify-content: center;
    align-items: center;
}

.crm-sidebar-collapsed .main-sidebar.crm-sidebar {
    width: var(--sidebar-collapsed);
}

.crm-sidebar-collapsed .main-sidebar.crm-sidebar,
.crm-sidebar-collapsed .main-sidebar.crm-sidebar:hover {
    width: var(--sidebar-collapsed) !important;
    transform: none !important;
}

.crm-sidebar-collapsed .content-wrapper.crm-content-wrapper {
    margin-left: var(--sidebar-collapsed);
}

.crm-sidebar-collapsed .main-sidebar .sidebar-menu > li > a {
    justify-content: center;
    padding: 9px 0;
    margin-left: 6px;
    margin-right: 6px;
}

.crm-sidebar-collapsed .main-sidebar .sidebar-menu > li > a > .menu-label {
    display: none !important;
}

.crm-sidebar-collapsed .main-sidebar .sidebar-menu > li > a .menu-icon {
    width: 26px;
    height: 26px;
    background: rgba(255, 221, 0, 0.14);
    border-color: rgba(255, 221, 0, 0.44);
}

.crm-sidebar-collapsed .main-sidebar .sidebar-menu > li > a .menu-icon-svg {
    width: 16px;
    height: 16px;
    opacity: 1;
}

#crmBody.crm-sidebar-collapsed .main-sidebar.crm-sidebar,
#crmBody.crm-sidebar-collapsed .main-sidebar.crm-sidebar:hover {
    width: var(--sidebar-collapsed) !important;
}

.crm-sidebar-collapsed .main-sidebar .sidebar-menu > li > a {
    position: relative;
}

.crm-sidebar-collapsed .main-sidebar .sidebar-menu > li > a:hover::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    color: #fff;
    background: #2c2f3d;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    z-index: 2000;
}

.lessons-page .panel-header {
    margin-bottom: 10px;
}

.lessons-page .panel-header h2 {
    font-size: 20px;
}

.lessons-page .btn {
    padding: 6px 10px;
    font-size: 12px;
}

.lessons-stats {
    margin-bottom: 8px;
    font-size: 14px;
}

.lessons-create-panel {
    margin-bottom: 10px !important;
    border: 1px solid #d8d7ce;
    border-radius: 8px;
    background: #fff;
    padding: 0;
}

.lessons-create-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
    user-select: none;
}

.lessons-create-title::-webkit-details-marker {
    display: none;
}

.lessons-create-title::after {
    content: '+';
    float: right;
    font-weight: 700;
    color: #3c3c3b;
}

.lessons-create-panel[open] .lessons-create-title::after {
    content: '−';
}

.lessons-create-body {
    border-top: 1px solid #eceae1;
    padding: 8px 10px;
}

.lessons-page .form-grid.two-cols {
    gap: 5px 8px;
}

.lessons-create-form {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.lessons-create-form .form-field {
    gap: 3px;
}

.lessons-page .form-field label {
    font-size: 11px;
    margin-bottom: 2px;
    font-weight: 600;
}

.lessons-page .form-field textarea {
    min-height: 34px;
    max-height: 64px;
}

.lessons-page .filters {
    margin-bottom: 8px;
}

.lessons-page .lessons-topics-table th,
.lessons-page .lessons-topics-table td {
    padding: 6px 6px;
    font-size: 12px;
}

.lessons-page .topic-row-grid {
    grid-template-columns: minmax(115px, 1fr) minmax(150px, 1.2fr) minmax(150px, 1fr) minmax(150px, 1fr) 90px 92px;
    gap: 5px;
}

.lessons-page .topic-row-grid input[type="text"],
.lessons-page .topic-row-grid input[type="url"],
.lessons-page .topic-row-grid textarea {
    min-height: 30px;
    border-radius: 7px;
    padding: 5px 7px;
    font-size: 12px;
}

.lessons-page .topic-row-grid textarea {
    min-height: 42px;
}

.lessons-page .topic-active-label {
    margin: 5px 0 0;
    font-size: 12px;
}

.lessons-create-form input[type="text"],
.lessons-create-form input[type="url"],
.lessons-create-form textarea,
.lessons-create-form select {
    min-height: 28px !important;
    padding: 4px 7px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
}

.lessons-create-compact-check {
    align-self: start;
    justify-content: flex-end;
}

.lessons-create-submit {
    align-self: end;
    grid-column: span 2;
}

.lessons-create-submit .btn {
    width: 100%;
    min-height: 30px;
}

@media (max-width: 1400px) {
    :root {
        --sidebar-width: 205px;
    }

    .org-name {
        font-size: clamp(20px, 1.6vw, 28px);
    }

    .page-title,
    .panel-header h2,
    .panel-header h3 {
        font-size: clamp(16px, 1.15vw, 20px);
    }

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

    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .dashboard-hero-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .dashboard-ops-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 210px;
    }

    .content-wrapper.crm-content-wrapper {
        padding: 12px;
    }

    .menu-icon {
        width: 23px;
        height: 23px;
    }

    .menu-icon-svg {
        width: 14px;
        height: 14px;
    }

    .user-chip {
        font-size: 14px;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .cards-grid,
    .two-cols {
        grid-template-columns: 1fr;
    }

    .topic-row-grid {
        grid-template-columns: 1fr;
    }

    .lessons-create-form {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-kpi-grid,
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-hero-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-trend-card__meta p {
        font-size: 16px;
    }
}

@media (max-width: 900px) {
    .content-wrapper.crm-content-wrapper {
        margin-left: var(--sidebar-width);
    }

    .panel {
        margin-bottom: 10px;
    }

    .group-meta-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-grid {
        grid-template-columns: 1fr;
    }

    .filter-row input,
    .filter-row select {
        min-height: 36px;
        font-size: 13px;
    }

    .lessons-create-form {
        grid-template-columns: 1fr;
    }

    .lessons-create-submit {
        grid-column: 1;
    }
}
