/* Изолированные стили для системы бронирования */
.booking-system {
    /* Сброс стилей внутри системы */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.5;

    /* Переопределяем Bootstrap стили */
    h1, h2, h3, h4, h5, h6 {
        margin: 0;
        font-weight: 600;
    }

    button {
        font-family: inherit;
    }

    input, select, textarea {
        font-family: inherit;
    }
    .d-none {
      display: none;
    }

    /* Стили формы авторизации */
    .auth-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
    }

    .auth-container {
        background: white;
        padding: 40px;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        width: 100%;
        max-width: 400px;
        text-align: center;
    }

    .auth-logo {
        margin-bottom: 30px;
    }

    .auth-logo i {
        font-size: 48px;
        color: #3b82f6;
        margin-bottom: 10px;
    }

    .auth-title {
        font-size: 24px;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 8px;
    }

    .auth-subtitle {
        color: #6b7280;
        margin-bottom: 30px;
    }

    .auth-form {
        text-align: left;
    }

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

    .form-label {
        display: block;
        margin-bottom: 6px;
        font-weight: 500;
        color: #374151;
        font-size: 14px;
    }

    .form-input {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.3s;
        background: #f9fafb;
    }

    .form-input:focus {
        outline: none;
        border-color: #3b82f6;
        background: white;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .code-input-group {
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }

    .code-input {
        width: 50px;
        height: 50px;
        text-align: center;
        font-size: 18px;
        font-weight: 600;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        background: #f9fafb;
        transition: all 0.3s;
    }

    .code-input:focus {
        outline: none;
        border-color: #3b82f6;
        background: white;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .code-separator {
        font-size: 20px;
        font-weight: bold;
        color: #6b7280;
    }

    .auth-button {
        width: 100%;
        padding: 12px;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        margin-top: 10px;
    }

    .auth-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    .auth-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    .auth-step {
        display: none;
    }

    .auth-step.active {
        display: block;
    }

    .step-indicator {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-bottom: 30px;
    }

    .step-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #e5e7eb;
        transition: all 0.3s;
    }

    .step-dot.active {
        background: #3b82f6;
        width: 24px;
        border-radius: 4px;
    }

    .back-button {
        background: none;
        border: none;
        color: #6b7280;
        cursor: pointer;
        font-size: 14px;
        margin-bottom: 20px;
        padding: 4px 0;
        transition: color 0.3s;
    }

    .back-button:hover {
        color: #374151;
    }

    .back-button i {
        margin-right: 4px;
    }

    /* Основные стили системы */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 70px;
        height: 100vh;
        background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        z-index: 1000;
    }

    .sidebar-icon {
        width: 45px;
        height: 45px;
        margin: 8px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255,255,255,0.7);
        border-radius: 8px;
        transition: all 0.3s;
        cursor: pointer;
    }

    .sidebar-icon:hover,
    .sidebar-icon.active {
        background: rgba(255,255,255,0.1);
        color: white;
    }

    .main-content {
        margin-left: 70px;
        padding: 0;
        min-height: 100vh;
    }

    .header {
        background: white;
        padding: 15px 25px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .search-box {
        position: relative;
    }

    .search-box input {
        padding: 8px 35px 8px 12px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        width: 250px;
        font-size: 14px;
    }

    .search-box i {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #6b7280;
    }

    .filters {
        background: white;
        padding: 20px 25px;
        border-bottom: 1px solid #e5e7eb;
    }

    .filters-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .filters-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #1f2937;
    }

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

    .filter-checkboxes {
        display: flex;
        gap: 20px;
        align-items: center;
        flex-wrap: wrap;
    }

    .filter-checkbox {
        display: flex;
        align-items: center;
        cursor: pointer;
        position: relative;
        padding-left: 0;
        user-select: none;
    }

    .filter-checkbox input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

    .checkmark {
        height: 18px;
        width: 18px;
        background-color: #f3f4f6;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        margin-right: 8px;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-checkbox:hover .checkmark {
        background-color: #e5e7eb;
        border-color: #9ca3af;
    }

    .filter-checkbox input:checked ~ .checkmark {
        background-color: #3b82f6;
        border-color: #3b82f6;
    }

    .filter-checkbox input:checked ~ .checkmark:after {
        content: "";
        display: block;
        width: 5px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

    .filter-label {
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .status-count {
        background: #f3f4f6;
        color: #6b7280;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
        min-width: 20px;
        text-align: center;
    }

    .content-area {
        padding: 20px 25px;
    }

    .data-table {
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

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

    th {
        background: #f9fafb;
        padding: 12px 15px;
        text-align: left;
        font-weight: 500;
        font-size: 12px;
        color: #6b7280;
        text-transform: uppercase;
        border-bottom: 1px solid #e5e7eb;
    }

    td {
        padding: 15px;
        border-bottom: 1px solid #f3f4f6;
        font-size: 14px;
    }

    tr:hover {
        background: #f9fafb;
    }

    .item-number {
        font-weight: 600;
        color: #1f2937;
    }

    .customer-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .customer-name {
        font-weight: 500;
        color: #1f2937;
    }

    .customer-type {
        font-size: 12px;
        color: #6b7280;
    }

    .source-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 8px;
        background: #8b5cf6;
        color: white;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    .status-badge {
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 500;
        text-transform: uppercase;
    }

    /* Статусы заказов */
    .status-not-processed {
        background: #f3f4f6;
        color: #6b7280;
    }

    .status-new {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .status-paid {
      background: #dcfce7;
      color: #16a34a;
    }

    .status-delivered {
        background: #dcfce7;
        color: #16a34a;
    }

    .status-cancelled {
        background: #fee2e2;
        color: #dc2626;
    }

    .status-refund {
        background: #fdf2f8;
        color: #be185d;
    }

    .status-unknown {
        background: #f1f5f9;
        color: #64748b;
    }

    .status-processed {
        background: #f0f9ff;
        color: #0369a1;
    }

    .status-delivery-waiting {
        background: #fef3c7;
        color: #d97706;
    }

    .status-active {
        background: #dcfce7;
        color: #16a34a;
    }

    .status-inactive {
        background: #fee2e2;
        color: #dc2626;
    }

    .status-in-progress {
        background: #fef3c7;
        color: #d97706;
    }

    .status-delivery {
        background: #e0e7ff;
        color: #4338ca;
    }

    .price {
        font-weight: 600;
        color: #1f2937;
    }

    .service-info {
        font-size: 12px;
        color: #3b82f6;
    }

    .actions {
        display: flex;
        gap: 8px;
    }

    .action-btn {
        width: 24px;
        height: 24px;
        border: none;
        background: none;
        color: #6b7280;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.3s;
    }

    .action-btn:hover {
        background: #f3f4f6;
        color: #374151;
    }

    .action-btn.comment-has-text {
        color: #16a34a;
        background: #f0fdf4;
    }

    .action-btn.comment-has-text:hover {
        background: #dcfce7;
        color: #15803d;
    }

    .btn-primary {
        background: #3b82f6;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 6px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s;
    }

    .btn-primary:hover {
        background: #2563eb;
        transform: translateY(-1px);
    }

    .btn-secondary {
        background: #6b7280;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 6px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s;
    }

    .btn-secondary:hover {
        background: #4b5563;
        transform: translateY(-1px);
    }

    .pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 25px;
        background: white;
        border-top: 1px solid #e5e7eb;
    }

    .pagination-info {
        font-size: 14px;
        color: #6b7280;
    }

    .pagination-controls {
        display: flex;
        gap: 5px;
    }

    .page-btn {
        width: 32px;
        height: 32px;
        border: 1px solid #d1d5db;
        background: white;
        color: #374151;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .page-btn:hover,
    .page-btn.active {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

    .collapse-btn {
        background: none;
        border: none;
        color: #6b7280;
        cursor: pointer;
        margin-right: 8px;
        transition: transform 0.3s;
    }

    .collapse-btn.expanded {
        transform: rotate(180deg);
    }

    .row-collapsed {
        background: #f9fafb;
    }

    .expanded-row {
        display: none;
        background: #f8fafc;
        border-left: 3px solid #3b82f6;
    }

    .expanded-row.show {
        display: table-row;
    }

    .expanded-content {
        padding: 20px;
        border-bottom: 1px solid #e5e7eb;
    }

    .tickets-list {
        background: white;
        border-radius: 8px;
        overflow: hidden;
    }

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

    .tickets-table th {
        background: #f8fafc;
        padding: 12px 15px;
        text-align: left;
        font-weight: 600;
        font-size: 13px;
        color: #374151;
        border-bottom: 2px solid #e5e7eb;
    }

    .tickets-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px;
        color: #374151;
    }

    .tickets-table tr:hover {
        background: #f8fafc;
    }

    .ticket-event {
        font-weight: 600;
        color: #1e40af;
    }

    .ticket-date {
        font-size: 12px;
        color: #6b7280;
    }

    .ticket-location {
        font-weight: 500;
    }

    .ticket-seat {
        font-family: monospace;
        background: #f1f5f9;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 12px;
    }

    .ticket-price {
        font-weight: 600;
        color: #059669;
    }

    .ticket-service {
        font-size: 12px;
        color: #6b7280;
    }

    /* Полноэкранное модальное окно */
    .fullscreen-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .fullscreen-modal.show {
        display: flex;
    }

    /* Компактное модальное окно */
    .fullscreen-modal .compact-modal {
        background: white;
        border-radius: 8px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        width: 90%;
        max-width: 500px;
        max-height: 80vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .fullscreen-modal .compact-modal .modal-header {
        padding: 15px 20px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #f9fafb;
        border-radius: 8px 8px 0 0;
    }

    .fullscreen-modal .compact-modal .modal-title {
        font-size: 18px;
        font-weight: 600;
        color: #1f2937;
    }

    .fullscreen-modal .compact-modal .modal-close {
        width: 30px;
        height: 30px;
        border: none;
        background: #f3f4f6;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }

    .fullscreen-modal .compact-modal .modal-close:hover {
        background: #e5e7eb;
        transform: scale(1.1);
    }

    .fullscreen-modal .compact-modal .modal-close i {
        font-size: 14px;
        color: #6b7280;
    }

    .fullscreen-modal .compact-modal .modal-body {
        padding: 20px;
        overflow-y: auto;
        background: white;
        border-radius: 0 0 8px 8px;
    }

    /* Полноэкранное модальное окно */
    .fullscreen-modal:not(.compact) {
        background: white;
        align-items: stretch;
        justify-content: stretch;
    }

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

    .modal-title {
        font-size: 24px;
        font-weight: 600;
        color: #1f2937;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        border: none;
        background: #f3f4f6;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }

    .modal-close:hover {
        background: #e5e7eb;
        transform: scale(1.1);
    }

    .modal-close i {
        font-size: 18px;
        color: #6b7280;
    }

    .modal-body {
        flex: 1;
        padding: 30px;
        overflow-y: auto;
        background: #f9fafb;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    /* Формы */
    .view-content {
        max-width: 1200px;
        margin: 0 auto;
    }

    .crud-form {
        background: white;
        padding: 30px;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        max-width: 600px;
        margin: 0 auto;
    }

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

    .crud-form .form-label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #374151;
    }

    .crud-form .form-input,
    .crud-form select,
    .crud-form textarea {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        font-size: 14px;
        transition: all 0.3s;
    }

    .crud-form .form-input:focus,
    .crud-form select:focus,
    .crud-form textarea:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .crud-form textarea {
        resize: vertical;
        min-height: 100px;
    }

    /* Анимации */
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .loading-spinner {
        animation: spin 1s linear infinite;
    }

    /* Адаптивность */
    @media (max-width: 768px) {
        .sidebar {
            width: 60px;
        }

        .main-content {
            margin-left: 60px;
        }

        .search-box input {
            width: 200px;
        }

        .filters {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }

        .header {
            flex-direction: column;
            gap: 15px;
            align-items: flex-start;
        }

        .header-left {
            width: 100%;
            justify-content: space-between;
        }

        .pagination {
            flex-direction: column;
            gap: 15px;
            align-items: center;
        }

        .modal-body {
            padding: 20px;
        }

        .crud-form {
            padding: 20px;
        }

        .data-table th:nth-child(n+7),
        .data-table td:nth-child(n+7) {
            display: none;
        }

        .data-table th:nth-child(5),
        .data-table td:nth-child(5) {
            display: none;
        }
    }

    @media (max-width: 480px) {
        .auth-container {
            padding: 30px 20px;
            margin: 20px;
        }

        .search-box input {
            width: 150px;
        }
    }
}
