/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    color: #7f8c8d;
}

.nav {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: #4CAF50;
    color: #fff;
}

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

.btn-outline {
    background: transparent;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.btn-outline:hover {
    background: #4CAF50;
    color: #fff;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text h2 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Features */
.features {
    padding: 80px 0;
    background: #fff;
}

.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: #2c3e50;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #7f8c8d;
    margin-top: -30px;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.feature-card p {
    color: #7f8c8d;
}

/* Pricing */
.pricing {
    padding: 80px 0;
    background: #fff;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.pricing-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pricing-card-featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4757;
    color: #fff;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.pricing-header h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.pricing-price {
    margin-bottom: 10px;
}

.price-amount {
    font-size: 48px;
    font-weight: bold;
}

.price-currency {
    font-size: 24px;
}

.pricing-period {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.pricing-card-featured .pricing-period {
    color: rgba(255,255,255,0.8);
}

.pricing-features {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.pricing-card-featured .pricing-features li {
    border-bottom-color: rgba(255,255,255,0.2);
}

.pricing-info {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
}

.pricing-info h3 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.info-item p {
    color: #7f8c8d;
}

/* Auth pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-box {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.auth-box-wide {
    max-width: 600px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.auth-header p {
    color: #7f8c8d;
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer a {
    color: #4CAF50;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #66bb6a;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 0;
}

.dashboard-sidebar {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.user-card {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.user-card h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.user-role {
    color: #7f8c8d;
    font-size: 14px;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.3s;
}

.nav-item:hover {
    background: #f5f5f5;
}

.nav-item.active {
    background: #4CAF50;
    color: #fff;
}

.nav-icon {
    font-size: 20px;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
}

.dashboard-section {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
}

.dashboard-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Rating */
.rating-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.rating-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rating-value {
    font-size: 32px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.rating-label {
    color: #7f8c8d;
    font-size: 14px;
}

/* Programs */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.program-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.3s;
}

.program-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.program-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.program-card p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Tasks */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.3s;
}

.task-item:hover {
    background: #e8f5e9;
}

.task-number {
    background: #4CAF50;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.task-title {
    flex: 1;
}

/* Trainers */
.trainers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.trainer-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.3s;
}

.trainer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.trainer-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.trainer-card p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.trainer-score {
    background: #e8f5e9;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

/* Lessons */
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.lesson-date {
    text-align: center;
    min-width: 60px;
}

.lesson-day {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
}

.lesson-month {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
}

.lesson-info {
    flex: 1;
}

.lesson-time {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.lesson-subject {
    color: #7f8c8d;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.stat-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.stats-list {
    list-style: none;
}

.stats-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.stats-list li:last-child {
    border-bottom: none;
}

.material-icon,
.trainer-title {
    flex: 1;
}

.material-status.completed {
    color: #4CAF50;
    font-weight: bold;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    padding: 5px 0;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-text h2 {
        font-size: 28px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: static;
    }
    
    .nav {
        flex-direction: column;
    }
}
/* --- СТИЛИ ДЛЯ ДОСКИ (lesson-room.php) --- */
.board-area {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); /* Высота за вычетом header */
}

.toolbar {
    background: #161b22;
    border-bottom: 1px solid #21262d;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 48px;
    flex-shrink: 0;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
    border-right: 1px solid #21262d;
}

.tool-group:last-child {
    border-right: none;
    margin-left: auto;
}

.tb-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #8892b0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.tb-btn:hover {
    background: #21262d;
    color: #e6edf3;
}

.tb-btn.active {
    background: #1f6feb;
    color: #fff;
}

.tb-btn svg {
    width: 18px;
    height: 18px;
}

.color-palette {
    display: flex;
    gap: 4px;
    align-items: center;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-dot.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px #1f6feb;
}

.custom-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 0;
    border: 2px solid #555;
    cursor: pointer;
    overflow: hidden;
}

.custom-color input {
    width: 24px;
    height: 24px;
    margin: -2px;
    padding: 0;
    border: none;
    cursor: pointer;
}

.sz-slider {
    width: 70px;
    accent-color: #1f6feb;
}

.sz-val {
    font-size: 11px;
    color: #e6edf3;
    min-width: 28px;
}

.board-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #2d2d2d;
    background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 40px 40px;
    cursor: grab;
}

.board-viewport.panning {
    cursor: grabbing;
}

.board-world {
    position: absolute;
    top: 0;
    left: 0;
    width: 10000px;
    height: 10000px;
    transform-origin: 0 0;
    will-change: transform;
}

.board-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 4000px;
    height: 3000px;
    background: #ffffff;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

.board-element {
    position: absolute;
    cursor: move;
    border: 2px solid transparent;
    user-select: none;
    z-index: 10;
}

.board-element:hover {
    border-color: rgba(31,111,235,.5);
}

.board-element.selected {
    border-color: #1f6feb;
    box-shadow: 0 0 0 1px #1f6feb;
}

.board-element canvas, .board-element img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.sync-indicator {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(76,175,80,.2);
    color: #4CAF50;
    border: 1px solid rgba(76,175,80,.3);
}

.sync-indicator.sync-error {
    background: rgba(255,71,87,.2);
    color: #ff4757;
    border-color: rgba(255,71,87,.3);
}

.sync-indicator.sync-success {
    background: rgba(76,175,80,.4);
    color: #fff;
}
/* --- КОНЕЦ СТИЛЕЙ ДЛЯ ДОСКИ --- */
/* ===== MODERN BOARD UI ===== */
.board-shell {
    display: grid;
    grid-template-columns: 1fr;
    height: calc(100vh - 60px);
    background: #0f172a;
}

.board-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
    flex-wrap: wrap;
}

.board-topbar .board-title {
    font-size: 16px;
    font-weight: 700;
    margin-right: auto;
}

.sync-indicator {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255,255,255,0.05);
    color: #cbd5e1;
}

.sync-indicator.sync-ok {
    color: #86efac;
    border-color: rgba(34,197,94,0.25);
    background: rgba(34,197,94,0.12);
}

.sync-indicator.sync-error {
    color: #fda4af;
    border-color: rgba(244,63,94,0.25);
    background: rgba(244,63,94,0.12);
}

.board-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: #111827;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.board-stage-wrap {
    position: relative;
    overflow: hidden;
    flex: 1;
    background:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 0) 0 0 / 24px 24px,
        linear-gradient(180deg, #334155 0%, #1e293b 100%);
}

.board-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
}

.board-viewport.panning {
    cursor: grabbing;
}

.board-world {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.board-content {
    position: relative;
    background: #fff;
    box-shadow: 0 20px 80px rgba(0,0,0,.35);
    border-radius: 18px;
    overflow: visible;
}

.board-grid-hint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .06;
    background-image:
      linear-gradient(to right, #000 1px, transparent 1px),
      linear-gradient(to bottom, #000 1px, transparent 1px);
    background-size: 48px 48px;
    border-radius: 18px;
}

.board-draw-layer {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: auto;
}

.board-items-layer {
    position: absolute;
    inset: 0;
}

.board-item {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15,23,42,.14);
    user-select: none;
}

.board-item.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb, 0 8px 30px rgba(15,23,42,.18);
}

.board-item-inner {
    width: 100%;
    height: 100%;
}

.board-item img,
.board-item canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #fff;
}

.board-text {
    width: 100%;
    height: 100%;
    padding: 14px 16px;
    background: rgba(255, 251, 235, .95);
    color: #111827;
    font-size: 18px;
    line-height: 1.45;
    white-space: pre-wrap;
    outline: none;
    border: none;
}

.item-handles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.board-item.selected .item-handles {
    pointer-events: auto;
}

.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #2563eb;
    border: 2px solid #fff;
    border-radius: 50%;
    display: none;
}

.board-item.selected .resize-handle {
    display: block;
}

.resize-handle.tl { left: -6px; top: -6px; cursor: nw-resize; }
.resize-handle.tr { right: -6px; top: -6px; cursor: ne-resize; }
.resize-handle.bl { left: -6px; bottom: -6px; cursor: sw-resize; }
.resize-handle.br { right: -6px; bottom: -6px; cursor: se-resize; }

.delete-btn {
    position: absolute;
    right: -12px;
    top: -12px;
    width: 26px;
    height: 26px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.board-item.selected .delete-btn {
    display: flex;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: min(1100px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
}

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

.pdf-page-thumb {
    position: relative;
    border: 2px solid #dbeafe;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
}

.pdf-page-thumb.selected {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,.15);
}

.pdf-page-thumb canvas {
    display: block;
    width: 100%;
    height: auto;
}

.pdf-page-thumb .page-number {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: rgba(15,23,42,.75);
    color: #fff;
    font-size: 12px;
    border-radius: 999px;
    padding: 4px 10px;
}

.cropper-stage {
    position: relative;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 14px;
}

.cropper-stage img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    user-select: none;
}

.cropper-selection {
    position: absolute;
    border: 2px dashed #fff;
    background: rgba(255,255,255,.16);
    cursor: move;
}

.cropper-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #2563eb;
    border-radius: 50%;
}

.cropper-handle.tl { left: -7px; top: -7px; cursor: nw-resize; }
.cropper-handle.tr { right: -7px; top: -7px; cursor: ne-resize; }
.cropper-handle.bl { left: -7px; bottom: -7px; cursor: sw-resize; }
.cropper-handle.br { right: -7px; bottom: -7px; cursor: se-resize; }

.vks-panel {
    min-width: 320px;
    max-width: 420px;
    width: 360px;
    height: 100%;
    background: #0b1220;
    border-left: 1px solid rgba(148,163,184,.14);
    display: flex;
    flex-direction: column;
}

.vks-panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
    flex: 1;
    background: #000;
}

.room-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    height: calc(100vh - 60px);
}

@media (max-width: 1100px) {
    .room-layout {
        grid-template-columns: 1fr;
    }
    .vks-panel {
        width: 100%;
        max-width: none;
        min-width: 0;
        height: 320px;
        border-left: 0;
        border-top: 1px solid rgba(148,163,184,.14);
    }
}