:root
{
    --white: #fff;
    --grey: #CCCCCC;
    --dark-grey: #818181;
    --black: #1a1a1a;
    --blue: rgba(47, 127, 218, 1);
    --blue05: rgba(47, 127, 218, 0.5);
    --red-alpha: rgba(255, 0, 0, 0.5);
    --red: rgba(255, 0, 0, 1);
}

*
{
    box-sizing: border-box;
}

body, html
{
    padding: 0;
    margin: 0;
    font-family: 'Arial';
    font-size: 16px;
}
header
{
    display: flex;
    width: 100%;
    position: sticky;
    top: 0;
    align-items: center;
    justify-content: center;
    background: var(--dark-grey);
    z-index: 2;
}

header .menu
{
    display: flex;
    justify-content: center;
    gap: 0px;
    padding: 0px;
}

header .menu a
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none;
    width: 100px;
    padding: 16px 0;
    flex: none;
    color: var(--white);
}

header .menu a i
{
    font-size: 32px;
}

header .menu a:hover
{
    background: var(--blue05);
}

header .menu a.selected
{
    background: var(--blue);
}

.center-block
{
    display: flex;
    justify-content: center;
    width: 100%;
}

.courses-manager-container {
    flex: none;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
}

.hidden-courses-toggle-container > div
{
    position: sticky;
    top: 100px;
}

.courses-category {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    min-height: 400px;
}

.category-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.courses-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    min-height: 200px;
}

.course-card {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    cursor: move;
    transition: all 0.3s ease;
}

.course-card.big-card {
    grid-column: span 2;
    grid-row: span 2;
}

.course-card.hidden-course {
    opacity: 0.6;
    filter: grayscale(100%);
}

.course-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.course-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px;
}

.course-name {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.2;
}

.course-groups {
    font-size: 12px;
    margin-bottom: 10px;
}

.course-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.control-btn:hover {
    background: rgba(255,255,255,0.3);
}

.add-course-btn {
    margin-top: 15px;
    padding: 10px;
    background: #007bff;
    color: white;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
}

.add-course-btn:hover {
    background: #0056b3;
}

.course-placeholder {
    border: 2px dashed #007bff;
    background: rgba(0,123,255,0.1);
    border-radius: 8px;
}


.data-table-container {
    margin: 20px;
    font-family: Arial, sans-serif;
}

.search-container {
    margin-bottom: 15px;
}

.search-input {
    padding: 8px 12px;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.data-table-editor {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    background-color: white;
}

.data-table-editor th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    position: relative;
    font-weight: 600;
    color: #495057;
}

.data-table-editor td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    vertical-align: middle;
}

.data-table-editor tr:hover td {
    background-color: #f8f9fa;
}

.editable-cell:hover {
    background-color: #e3f2fd !important;
}

.file-image {
    max-width: 50px;
    max-height: 50px;
    border-radius: 4px;
    object-fit: cover;
}

.file-link {
    color: #007bff;
    text-decoration: none;
}

.file-link:hover {
    text-decoration: underline;
}

.edit-dialog, .delete-dialog, .add-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dialog-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.dialog-content input,
.dialog-content select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.dialog-content input:focus,
.dialog-content select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.file-input-container {
    margin-bottom: 16px;
}

.file-preview {
    display: block;
    max-width: 200px;
    max-height: 150px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.upload-btn {
    padding: 8px 16px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.upload-btn:hover {
    background-color: #218838;
}

.upload-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.dialog-buttons button, .add-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.delete-btn
{
    display: inline-block;
    -webkit-appearance:none;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    background: var(--red-alpha);
    color: var(--white);
}

.delete-btn:hover {
    background: var(--red);
}

.dialog-buttons button:first-child, .add-btn {
    background-color: #007bff;
    color: white;
}

.dialog-buttons button:first-child:hover {
    background-color: #0056b3;
}

.dialog-buttons button:last-child {
    background-color: #6c757d;
    color: white;
}

.dialog-buttons button:last-child:hover {
    background-color: #545b62;
}

.sort-icon {
    font-size: 12px;
    margin-left: 5px;
    opacity: 0.6;
}

.data-table-editor th:hover .sort-icon {
    opacity: 1;
}

.librari-data, .course-data
{
    display: grid;
    grid-template-columns: 15vw 1fr;
}

.lib-list, .course-list
{
    display: block;
    position: relative;
}

.lib-list .lib-list-block, .course-list .course-list-block
{
    position: sticky;
    top: 88px;
    display: flex;
    gap: 0px;
    padding-top: 8px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.lib-list a, .course-list .course-list-block a
{
    display: flex;
    gap: 0.5rem;
    padding: 10px 16px;
    color: var(--black);
    width: 100%;
    justify-content: flex-start;
    text-decoration: none;
}

.lib-list a:before
{
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: "\f02d";
}

.course-list .course-list-block a:before
{
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    width: 1.2rem;
}

.course-list .course-list-block a.c-info:before
{
    content: "\f05a";
}

.course-list .course-list-block a.c-groups:before
{
    content: "\e533";
}

.course-list .course-list-block a.site-preview:before
{
    content: "\f0e8";
}

.course-list .course-list-block a.toxls:before
{
    content: "\f1c3";
}

.lib-list a.selected, .course-list .course-list-block a.selected
{
    color: var(--white);
    background: var(--blue);
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}


.course-data .form-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            font-family: Arial, sans-serif;
        }
        .course-data .form-group {
            margin-bottom: 15px;
        }
        .course-data label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        .course-data input[type="text"],
        .course-data input[type="email"],
        .course-data input[type="number"],
        .course-data input[type="file"],
        .course-data textarea,
        .course-data select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        .course-data textarea {
            min-height: 100px;
            resize: vertical;
        }
        .course-data .checkbox-group {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .course-data .checkbox-group input[type="checkbox"] {
            width: auto;
        }
        .course-data .readonly-field {
            background-color: #f5f5f5;
            color: #666;
            cursor: not-allowed;
        }
        .course-data .submit-btn {
            background-color: #007bff;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        .course-data .submit-btn:hover {
            background-color: #0056b3;
        }

        .course-data .image-preview {
            margin-top: 10px;
            max-width: 300px;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 5px;
        }
        .course-data .image-preview img {
            max-width: 100%;
            height: auto;
            display: block;
        }
        .course-data .current-image {
            font-style: italic;
            color: #666;
            margin-top: 5px;
        }
        .course-data .file-upload-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

         .groups-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-gap: 20px;
        }

        .groups-container h1
        {
            grid-column: span 2;
            margin: 0;
            display: flex;
            justify-content: space-between;
            gap: 10px;
        }
        
        .group-item {
            background: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            cursor: grab;
            transition: all 0.3s ease;
        }
        
        .group-item.hidden {
            background-color: #f8f9fa;
            opacity: 0.7;
            border-left: 4px solid #dc3545;
        }
        
        .group-item:hover {
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
            transform: translateY(-2px);
        }
        
        .group-item:active {
            cursor: grabbing;
        }
        
        .group-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 10px;
        }
        
        .group-title {
            font-size: 18px;
            font-weight: bold;
            color: #333;
            margin: 0;
        }
        
        .group-status {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .status-badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }
        
        .status-visible {
            background-color: #d4edda;
            color: #155724;
        }
        
        .status-hidden {
            background-color: #f8d7da;
            color: #721c24;
        }
        
        .group-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .detail-item {
            display: flex;
            flex-direction: column;
        }
        
        .detail-label {
            font-size: 12px;
            color: #666;
            margin-bottom: 2px;
        }
        
        .detail-value {
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }
        
        .group-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            flex-wrap: wrap;
        }
        
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            text-decoration: none;
            transition: background-color 0.3s ease;
        }

        .btn i+span{
            margin-left: 5px;
        }
        
        .btn-edit {
            background-color: #007bff;
            color: white;
        }
        
        .btn-edit:hover {
            background-color: #0056b3;
        }
        
        .btn-students {
            background-color: #28a745;
            color: white;
        }
        
        .btn-students:hover {
            background-color: #1e7e34;
        }
        
        .btn-schedule, .btn.yellow {
            background-color: #ffc107;
            color: #212529;
        }
        
        .btn-schedule:hover, .btn.yellow:hover {
            background-color: #e0a800;
        }
        
        .btn-visibility {
            background-color: #6c757d;
            color: white;
        }
        
        .btn-visibility:hover {
            background-color: #545b62;
        }
        
        .btn-hide {
            background-color: #dc3545;
        }
        
        .btn-show {
            background-color: #28a745;
        }
        
        .dragging {
            opacity: 0.5;
            background-color: #f8f9fa;
        }

        #groupsList, #groupEditor
        {
            display: block;
            overflow: auto;
        }
        .groups-container.short-view
        {
            grid-template-columns: 1fr 3fr;
        }

        .groups-container.short-view .group-item .group-details
        {
            display: none;
        }

        .groups-container.short-view .btn span
        {
            display: none;
        }

 .snackbar-container {
            position: fixed;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            align-items: center;
            pointer-events: none;
        }
        
        .snackbar-container.top {
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
        }
        
        .snackbar-container.bottom {
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
        }
        
        .snackbar {
            background: rgba(33, 33, 33, 0.95);
            color: white;
            padding: 16px 24px;
            border-radius: 8px;
            margin: 8px 0;
            min-width: 300px;
            max-width: 500px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            justify-content: space-between;
            transform: translateY(-20px);
            opacity: 0;
            transition: all 0.3s ease;
            pointer-events: auto;
        }
        
        .snackbar.visible {
            transform: translateY(0);
            opacity: 1;
        }
        
        .snackbar-content {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .snackbar-icon {
            font-size: 20px;
        }
        
        .snackbar-message {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 14px;
            line-height: 1.4;
        }
        
        .snackbar-close {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.7);
            font-size: 18px;
            cursor: pointer;
            padding: 4px;
            margin-left: 16px;
            border-radius: 4px;
            transition: color 0.2s ease;
        }
        
        .snackbar-close:hover {
            color: white;
        }
        
        .snackbar.success { background: rgba(46, 125, 50, 0.95); }
        .snackbar.error { background: rgba(211, 47, 47, 0.95); }
        .snackbar.warning { background: rgba(237, 108, 2, 0.95); }
        .snackbar.info { background: rgba(2, 119, 189, 0.95); }
        .snackbar.loading { background: rgba(33, 33, 33, 0.95); }
        
        .loader {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .progress-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 3px;
            background: rgba(255, 255, 255, 0.5);
            width: 100%;
            border-radius: 0 0 8px 8px;
            overflow: hidden;
        }
        
        .progress-bar-inner {
            height: 100%;
            background: white;
            width: 100%;
            transform: scaleX(0);
            transform-origin: left;
            transition: transform linear;
        }

        .schedule-field-group {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.schedule-legend {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    font-size: 16px;
}

.schedule-fields {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    /*flex-wrap: wrap;*/
}

.weekday-select,
.cabinet-select,
.time-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 60px;
}

.time-input {
    width: 100px;
}

.add-schedule-btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 10px 0;
    font-size: 14px;
}

.add-schedule-btn:hover {
    background-color: #45a049;
}

.delete-schedule-btn {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    flex: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-schedule-btn:hover {
    background-color: #da190b;
}

.schedule-group {
    position: relative;
}

.date-field {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.student-grid-container {
            margin: 20px;
            /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
        }
        
        .student-grid-controls {
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .student-grid-search {
            padding: 8px 12px;
            border: 2px solid #e1e5e9;
            border-radius: 6px;
            min-width: 250px;
            width: 100%;
            transition: border-color 0.3s ease;
        }
        
        .student-grid-search:focus {
            outline: none;
            border-color: #4a90e2;
        }
        
        .student-grid-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin-bottom: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .student-grid-header, .student-grid-cell {
            padding: 14px;
            text-align: left;
            border-bottom: 1px solid #e1e5e9;
        }
        
        .student-grid-header {
            background-color: #2c3e50;
            color: white;
            cursor: pointer;
            position: relative;
            user-select: none;
            font-weight: 600;
            transition: background-color 0.3s ease;
        }
        
        .student-grid-header:hover {
            background-color: #34495e;
        }
        
        .student-grid-header.sorted-asc::after {
            content: ' ▲';
            font-size: 12px;
            opacity: 0.8;
        }
        
        .student-grid-header.sorted-desc::after {
            content: ' ▼';
            font-size: 12px;
            opacity: 0.8;
        }
        
        .student-grid-row:hover {
            background-color: #f8f9fa;
        }
        
        .student-grid-row:nth-child(even) {
            background-color: #fafbfc;
        }
        
        .student-grid-btn {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .student-grid-btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .student-grid-btn-primary:hover {
            background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .student-grid-modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
        }
        
        .student-grid-modal-content {
            background-color: white;
            margin: 5% auto;
            padding: 25px;
            border-radius: 12px;
            width: 85%;
            max-width: 700px;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        
        .student-grid-close {
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            color: #999;
            transition: color 0.3s ease;
        }
        
        .student-grid-close:hover {
            color: #333;
        }
        
        .student-grid-pagination {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 25px;
        }
        
        .student-grid-page-btn {
            padding: 8px 14px;
            border: 2px solid #e1e5e9;
            background: white;
            cursor: pointer;
            border-radius: 6px;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .student-grid-page-btn:hover {
            border-color: #4a90e2;
            color: #4a90e2;
        }
        
        .student-grid-page-btn.active {
            background: linear-gradient(135deg, #4a90e2 0%, #63b3ed 100%);
            color: white;
            border-color: #4a90e2;
        }
        
        .student-grid-empty {
            text-align: center;
            padding: 40px;
            color: #999;
            font-style: italic;
        }

        .t-parents
        {
            display: flex;
            gap: 10px;
            justify-content: flex-start;
            align-items: flex-start;
        }

        .details .t-parents
        {
            flex-direction: column;
        }
        
        .parent-item {
            flex: 1;
            margin-bottom: 10px;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 6px;
            border-left: 4px solid #4a90e2;
        }
        
        .parent-name {
            font-weight: 600;
            color: #2c3e50;
        }
        
        .parent-contacts {
            margin-top: 5px;
            font-size: 14px;
            color: #666;
        }
.pupils-block
{
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
}

.pupils-block.details
{
    grid-template-columns: 1fr 1fr;
}

.pupils-list
{
    padding: 0 20px;
}


.student-card {
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.student-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.student-name {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.student-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 14px;
    opacity: 0.9;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
}

.tab.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    background: white;
}

.tab-content {
    padding: 25px;
}

#student-card  .course-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    aspect-ratio: initial;
    transition: transform 0.2s ease;
}

#student-card  .course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#student-card  .course-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

#student-card  .course-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    font-size: 14px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 4px;
    font-size: 12px;
}

.detail-value {
    color: #2c3e50;
}

.state-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.state-enrolled {
    background-color: #d4edda;
    color: #155724;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.student-tabs-container {
    font-family: Arial, sans-serif;
}

.student-tabs-header {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    transition: background 0.3s;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #007cba;
    color: white;
}

.tab-content {
    /*display: none;*/
    padding: 20px;
}

.student-tabs-content .tab-content
{
    display: none;
    padding: 0;
}

.tab-content.active, .student-tabs-content .tab-content.active {
    display: block;
}

.students-table, .lessons-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.students-table
{
    font-size: 12px;
}

.students-table th, .lessons-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
}

.students-table td, .lessons-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.students-table tr:hover, .lessons-table tr:hover {
    background: #f5f5f5;
}


#schedule-output .schedule-container {
            font-family: Arial, sans-serif;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        #schedule-output .semester-card {
            background: #f5f5f5;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            border-left: 4px solid #4CAF50;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        #schedule-output .semester-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px solid #ddd;
        }
        
        #schedule-output .semester-name {
            font-size: 1.2em;
            font-weight: bold;
            color: #333;
        }
        
        #schedule-output .semester-dates {
            color: #666;
            font-size: 0.9em;
        }
        
        #schedule-output .timetable {
            margin-top: 10px;
        }
        
        #schedule-output .timetable-item {
            background: white;
            padding: 8px 12px;
            margin-bottom: 5px;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        #schedule-output .weekday {
            font-weight: bold;
            min-width: 100px;
        }
        
        #schedule-output .time {
            color: #2196F3;
            font-weight: bold;
        }
        
        #schedule-output .cabinet {
            background: #FF9800;
            color: white;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.8em;
        }
        
        #schedule-output .meta-info {
            font-size: 0.8em;
            color: #888;
            margin-top: 10px;
            text-align: right;
        }
        
        #schedule-output .no-data {
            text-align: center;
            color: #999;
            padding: 20px;
            font-style: italic;
        }


        #group-journal .journal-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }
        
        #group-journal .semester-section {
            margin-bottom: 40px;
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        #group-journal .semester-header {
            background: #4CAF50;
            color: white;
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        #group-journal .semester-title {
            font-size: 1.4em;
            font-weight: bold;
        }
        
        #group-journal .semester-dates {
            font-size: 1em;
            opacity: 0.9;
        }
        
        #group-journal .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
            margin-bottom: 15px;
        }
        
        #group-journal .calendar-header {
            background: #e9ecef;
            padding: 10px;
            text-align: center;
            font-weight: bold;
            border-radius: 5px;
            font-size: 0.9em;
        }
        
        #group-journal .calendar-day {
            background: white;
            border: 2px solid #e9ecef;
            padding: 12px 8px;
            text-align: center;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            min-height: 80px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
        }
        
        #group-journal .calendar-day:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        #group-journal .calendar-day.has-lesson {
            background: #e8f5e8;
            border-color: #4CAF50;
        }
        
        #group-journal .calendar-day.has-lesson:hover {
            border-color: #388E3C;
        }
        
        #group-journal .calendar-day.no-theme {
            background: #fff3cd;
            border-color: #ffc107;
        }
        
        #group-journal .calendar-day.no-theme:hover {
            border-color: #e0a800;
        }
        
        #group-journal .calendar-day.no-attendance {
            background: #f8d7da;
            border-color: #dc3545;
        }
        
        #group-journal .calendar-day.no-attendance:hover {
            border-color: #c82333;
        }
        
        #group-journal .calendar-day.both-issues {
            background: linear-gradient(135deg, #fff3cd 50%, #f8d7da 50%);
            border-color: #ffc107;
        }
        
        #group-journal .calendar-day.empty {
            background: #f8f9fa;
            border-color: #dee2e6;
            cursor: default;
        }
        
        #group-journal .calendar-day.empty:hover {
            transform: none;
            box-shadow: none;
            border-color: #dee2e6;
        }
        
        #group-journal .day-number {
            font-size: 1.1em;
            font-weight: bold;
            color: #333;
        }

        #group-journal .day-number span{
            font-size: 0.8em;
            font-weight: normal;
        }
        
        #group-journal .lesson-indicators {
            display: flex;
            justify-content: center;
            gap: 4px;
            margin-top: 5px;
        }
        
        #group-journal .indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            border: 1px solid rgba(0,0,0,0.1);
        }
        
        #group-journal .indicator.no-theme {
            background: #ffc107;
        }
        
        #group-journal .indicator.no-attendance {
            background: #dc3545;
        }
        
        #group-journal .lesson-status {
            font-size: 0.7em;
            color: #666;
            margin-top: 3px;
        }
        
        #group-journal .status-warning {
            color: #856404;
        }
        
        #group-journal .status-danger {
            color: #721c24;
        }
        
        #group-journal .month-separator {
            text-align: center;
            font-size: 1.2em;
            font-weight: bold;
            color: #495057;
            margin: 30px 0 15px 0;
            padding: 10px;
            background: linear-gradient(90deg, transparent, #e9ecef, transparent);
        }
        
        #group-journal .semester-meta {
            font-size: 0.8em;
            color: #6c757d;
            text-align: right;
            margin-top: 10px;
        }
        
        #group-journal .legend {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 20px 0;
            flex-wrap: wrap;
        }
        
        #group-journal .legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.8em;
        }
        
        #group-journal .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 3px;
            border: 1px solid rgba(0,0,0,0.2);
        }
        
        #group-journal .legend-normal {
            background: #e8f5e8;
            border-color: #4CAF50;
        }
        
        #group-journal .legend-no-theme {
            background: #fff3cd;
            border-color: #ffc107;
        }
        
        #group-journal .legend-no-attendance {
            background: #f8d7da;
            border-color: #dc3545;
        }

        #courses-container
        {
            display: grid;
            grid-template-columns: 200px 1fr;
        }
        
        @media (max-width: 768px) {
            #group-journal .calendar-grid {
                grid-template-columns: repeat(3, 1fr);
            }
            #courses-container
        {
            display: grid;
            grid-template-columns: 1fr;
        }   
            #group-journal .semester-header {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }
            
            #group-journal .legend {
                flex-direction: column;
                align-items: center;
                gap: 10px;
            }

            .courses-list
            {
                grid-template-columns: repeat(1, 1fr);
            }

            .librari-data, .course-data
            {
                grid-template-columns: 1fr;
            }

            .groups-container h1
            {
                grid-column: span 1;
            }

            .groups-container
            {
                grid-template-columns: 1fr;
            }
        }


        .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-window {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.modal-content {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.attendance-form {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.theme-section {
    margin-bottom: 30px;
}

.theme-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.theme-section input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pupils-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.pupil-row {
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.pupil-name {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.status-group {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-container {
    margin-top: 10px;
}

.comment-container label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.comment-container input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.save-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.save-btn:hover {
    background-color: #45a049;
}

.course-records-table {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.course-records-table h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 14px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.records-table th,
.records-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.records-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.records-table tr:hover {
    background-color: #f8f9fa;
}

.course-group-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.checkbox-group-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    margin: 0;
}

.checkbox-wrapper label {
    margin: 0;
    cursor: pointer;
}

#scheduleEditForm
{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

#scheduleEditForm h2, #scheduleEditForm .schedule-group
{
    grid-column: span 2;
}

#scheduleEditForm .form-group label
{
    display: block;
}

.toggle-container {
            display: flex;
            align-items: center;
            gap: 20px;
            margin: 20px 10px;
        }
        
        .toggle-label {
            color: #666;
            font-size: 16px;
            font-weight: 500;
        }
        
        /* Apple Style Toggle */
        .apple-toggle {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 22px;
        }
        
        .apple-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #e9e9ea;
            transition: .3s;
            border-radius: 22px;
        }
        
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 2px;
            bottom: 1px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        
        input:checked + .toggle-slider {
            background-color: #34c759;
        }
        
        input:checked + .toggle-slider:before {
            transform: translateX(18px);
        }
        
        /* Hover эффект */
        .toggle-slider:hover {
            opacity: 0.9;
        }
        
        /* Состояние disabled */
        .toggle-slider:active:before {
            transform: scale(0.95);
        }

        .groups-container.unvisible
        {
            grid-template-columns: 1fr;
        }

        .groups-container.unvisible #groupsList
        {
            display: none;
        }

        .tt-editor
        {
            display: grid;
            grid-template-columns: 3fr 1fr;
        }

        #tte-form
        {
            position: sticky;
            top: 0;
        }

.payed-line
{
    background: #d8f4d8;
}

.unpayed-line
{
    background: #f4d8d8;
}