.ticket-scanner-page {
    .scanner-result-overlay {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: $body-bg;
        color: $body-color;
        overflow-y: auto;
        padding: 0;
    
        [data-bs-theme="dark"] & {
            background: $body-bg-dark;
            color: $body-color-dark;
        }
    }
    
    .scanner-event-header {
        color: $white;
        font-size: 2.2rem;
        font-weight: 700;
        text-align: center;
        padding: 2rem 1rem 1.5rem 1rem;
        border-radius: 0 0 24px 24px;
    }
    
    .scanner-ticket-block {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .scanner-ticket-badge {
        display: inline-block;
        background: $dark;
        color: $white;
        border-radius: 16px;
        padding: 0.4em 1.5em;
        font-size: 1.3rem;
        font-weight: 600;
    
        [data-bs-theme="dark"] & {
            background: $dark-dark;
            color: $body-bg-dark;
        }
    }
    
    .scanner-attendee-list {
        margin-top: 1.2rem;
        margin-bottom: 1.2rem;
        display: inline-block;
        text-align: center;
    }
    
    .scanner-attendee-name {
        font-size: 2rem;
        font-weight: 600;
        text-align: left;
        color: $body-color;
    
        [data-bs-theme="dark"] & {
            color: $body-color-dark;
        }
    }
    
    .scanner-attendee-checkin {
        font-size: 1.2rem;
        color: $gray-600;
        margin-top: 0.3rem;
        font-weight: 400;
    
        [data-bs-theme="dark"] & {
            color: $gray-300-dark;
        }
    
        i {
            margin-right: 0.5rem;
            color: $gray-500;
    
            [data-bs-theme="dark"] & {
                color: $gray-400-dark;
            }
        }
    }
    
    .scanner-customer-block {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .scanner-customer-badge {
        display: inline-block;
        background: $light-secondary;
        color: $body-color;
        border-radius: 12px;
        padding: 0.3em 1.2em;
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.7rem;
    
        [data-bs-theme="dark"] & {
            background: $dark-secondary;
            color: $body-color-dark;
        }
    }
    
    .scanner-customer-name {
        font-size: 1.3rem;
        font-weight: 500;
        color: $body-color;
    
        [data-bs-theme="dark"] & {
            color: $body-color-dark;
        }
    }
    
    .scanner-customer-email {
        font-size: 1.1rem;
        color: $gray-600;
        margin-bottom: 0.2em;
    
        [data-bs-theme="dark"] & {
            color: $gray-300-dark;
        }
    }
    
    .scanner-checkin-status-bar {
        background: $secondary;
        color: $white;
        border-radius: 16px;
        padding: 1.2rem 0.5rem 0.7rem 0.5rem;
        text-align: center;
        font-size: 2rem;
        font-weight: 700;
        position: fixed;
        left: 5vw;
        right: 5vw;
        bottom: 3vw;
        margin: 0 auto;
        box-shadow: $box-shadow-smooth-md;
        display: flex;
        flex-direction: column;
        align-items: center;
    
        [data-bs-theme="dark"] & {
            background: $dark-secondary;
            box-shadow: $box-shadow-dark;
        }
    }
    
    .scanner-checkin-status-text {
        font-size: 1.3em;
        font-weight: 700;
        margin-bottom: 0.2em;
    }
    
    .scanner-checkin-time {
        font-size: 1.1em;
        font-weight: 400;
        letter-spacing: 0.5px;
    }
    
    .scanner-error-message {
        font-size: 1.5rem;
        text-align: center;
        margin-top: 2rem;
        font-weight: bold;
        color: $danger;
    
        [data-bs-theme="dark"] & {
            color: $dark-danger;
        }
    }
    
    // Check-in mode toggle buttons - ensure white text when selected
    #scan-mode-toggle {
        .btn-check:checked + .btn-outline-primary {
            color: $white !important;
            background-color: var(--bs-primary) !important;
            border-color: var(--bs-primary) !important;
    
            i {
                color: $white !important;
            }
    
            &:hover {
                color: $white !important;
                background-color: var(--bs-primary) !important;
                border-color: var(--bs-primary) !important;
            }
        }
    }
    
    // New Professional Ticket Scanner Styles
    .ticket-scanner-container {
        min-height: 100vh;
        background: $secondary;
        padding: 20px;
        
        [data-bs-theme="dark"] & {
            background: $dark;
        }
    }
    
    // Scan Mode Section
    .scan-mode-section {
        background: $light;
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 20px;
        margin-bottom: 30px;
        box-shadow: $box-shadow;
        border: 1px solid $border-color;
    
        [data-bs-theme="dark"] & {
            background: $dark;
            color: $light;
        }
    }
    
    .mode-toggle-container {
        text-align: center;
    }
    
    .mode-toggle-header {
        margin-bottom: 12px;
    }
    
    .mode-title {
        color: $body-color;
        font-weight: 700;
        font-size: 1.3rem;
        margin: 0;
    
        [data-bs-theme="dark"] & {
            color: $light;
        }
    }
    
    .mode-subtitle {
        color: $gray-600;
        font-size: 0.95rem;
        margin: 5px 0 0 0;
    
        [data-bs-theme="dark"] & {
            color: $gray-400;
        }
    }
    
    .mode-toggle-buttons {
        margin-bottom: 20px;
    }
    
    .mode-btn-group {
        display: flex;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .mode-btn {
        border: 2px solid $primary;
        border-radius: 15px;
        padding: 20px 25px;
        min-width: 200px;
        transition: all 0.3s ease;
        background: $light;
        position: relative;
        overflow: hidden;
    
        &:hover {
            transform: translateY(-2px);
            box-shadow: $box-shadow;
        }
    
        [data-bs-theme="dark"] & {
            background: $dark;
            border-color: $border-color-translucent;
            color: $light;
        }
    }
    
    .mode-btn-content {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .mode-icon {
        font-size: 1.5rem;
        color: $primary;
        transition: all 0.3s ease;
    }
    
    .mode-text {
        text-align: left;
    }
    
    .mode-label {
        display: block;
        font-weight: 600;
        color: $body-color;
        font-size: 1rem;
        margin-bottom: 2px;
    
        [data-bs-theme="dark"] & {
            color: $light;
        }
    }
    
    .mode-description {
        display: block;
        color: $gray-600;
        font-size: 0.85rem;
    
        [data-bs-theme="dark"] & {
            color: $gray-400;
        }
    }
    
    // Selected state for mode buttons
    .btn-check:checked + .mode-btn {
        border-color: $primary;
        background: $primary;
        color: $white;
        transform: translateY(-2px);
        box-shadow: $box-shadow;
    
        .mode-icon,
        .mode-label,
        .mode-description {
            color: $white;
        }
    }
    
    .mode-help-text {
        margin-top: 20px;
    }
    
    .help-indicator {
        display: inline-flex;
        align-items: baseline;
        padding: 12px;
        background: rgba($primary, 0.1);
        border-radius: 10px;
        color: $primary;
        text-align: start;
        line-height: 1.3;
        font-size: 1.1rem;
        transition: all .3s ease;
    
        &.active {
            background: rgba($primary, 0.15);
        }
    }
    
    // Scanner Overlay
    .scanner-overlay {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba($dark, 0.8);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        animation: fadeIn 0.3s ease;
    }
    
    .overlay-content {
        background: $light;
        border-radius: 20px;
        max-width: 800px;
        width: 100%;
        max-height: 95vh;
        overflow-y: auto;
        box-shadow: $box-shadow;
        animation: slideUp 0.4s ease;
        padding: 0;
    
        [data-bs-theme="dark"] & {
            background: $dark;
            color: $light;
        }
    }
    
    // Result Header
    .result-header {
        padding: 20px;
        border-radius: 20px 20px 0 0;
        display: flex;
        align-items: center;
        gap: 20px;
    
        &--success {
            background: $success;
            color: $white;
        }
    
        &--warning {
            background: $warning;
            color: $white;
        }
    
        &--error {
            background: $danger;
            color: $white;
        }
    }
    
    .manual-header {
        background: $primary;
        color: $white;
    }
    
    .header-icon {
        font-size: 2.5rem;
        opacity: 0.9;
    }
    
    .header-content {
        flex: 1;
    }
    
    .event-title {
        font-size: 1.4rem;
        font-weight: bold;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;

        .total-count {
            position: absolute;
            right: 0;
            background: #fff;
            padding: 0.6rem;
            border-radius: 50%;
            top: 0;
            color: #000;
            font-weight: 900;
            font-size: 1.5rem;
        }

        [data-bs-theme="dark"] & {
            color: $light;
        }
    }
    
    .order-number {
        font-size: 0.9rem;
        opacity: 0.8;
        margin: 0;
    }
    
    .result-status {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
    }
    
    // Tickets Section
    .tickets-section {
        padding: 0;
    }
    
    .ticket-card {
        background: $light-secondary;
        padding: 20px;
        border: 1px solid $border-color;
        transition: all 0.3s ease;
    
        &:hover {
            transform: translateY(-2px);
            box-shadow: $box-shadow;
        }
    
        [data-bs-theme="dark"] & {
            background: $dark-secondary;
            border-color: $border-color-translucent;
        }
    }
    
    .ticket-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 10px;
    }
    
    .ticket-icon {
        color: $primary;
        font-size: 1.5rem;
    }
    
    .ticket-title {
        font-weight: bold;
        color: $body-color;
        font-size: 1.4rem;
    
        [data-bs-theme="dark"] & {
            color: $light;
        }
    }
    
    .attendees-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .attendee-item {
        background: $light;
        border-radius: 10px;
        padding: 13px;
        border: 1px solid $border-color;
    
        [data-bs-theme="dark"] & {
            background: $dark;
            border-color: $border-color-translucent;
        }
    }
    
    .attendee-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .attendee-name {
        font-weight: 600;
        color: $body-color;
        font-size: 1.5rem;
    
        [data-bs-theme="dark"] & {
            color: $light;
        }
    }
    
    .attendee-details {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .seat-info, .checkin-time {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 1rem;
        color: $gray-600;
    
        i {
            color: $primary;
        }
    
        [data-bs-theme="dark"] & {
            color: $gray-400;
        }
    }
    
    // Customer Section
    .customer-section {
        padding: 20px;
    }
    
    .customer-card {
        background: $light-secondary;
        border-radius: 15px;
        padding: 20px;
        border: 1px solid $border-color;
    
        [data-bs-theme="dark"] & {
            background: $dark-secondary;
            border-color: $border-color-translucent;
        }
    }
    
    .customer-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
        color: $primary;
        font-weight: 600;
    }
    
    .customer-info {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .customer-name {
        font-weight: 600;
        color: $body-color;
        font-size: 1.1rem;
    
        [data-bs-theme="dark"] & {
            color: $light;
        }
    }
    
    .customer-email {
        color: $gray-600;
        font-size: 0.9rem;
    
        [data-bs-theme="dark"] & {
            color: $gray-400;
        }
    }
    
    // Action Section
    .action-section {
        padding: 0 20px 20px;
    }
    
    .checkin-btn {
        background: $success;
        border: none;
        border-radius: 12px;
        padding: 15px 30px;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: $box-shadow;
        width: 100%;
    
        &:hover {
            transform: translateY(-2px);
            box-shadow: $box-shadow;
        }
    
        &:disabled {
            opacity: 0.7;
            transform: none;
        }
    }
    
    .already-checked-in {
        margin-bottom: 15px;
    }
    
    .error-message {
        background: rgba($danger, 0.1);
        color: $danger;
        padding: 12px 15px;
        border-radius: 8px;
        font-size: 0.9rem;
        margin-top: 15px;
    }
    
    // Overlay Actions
    .overlay-actions {
        padding: 20px 30px 30px;
        text-align: center;
    
        .btn {
            border-radius: 10px;
            padding: 12px 25px;
            font-weight: 500;
            transition: all 0.3s ease;
    
            &:hover {
                transform: translateY(-1px);
            }
        }
    }
    
    // Error Result
    .error-result {
        padding: 40px 30px;
        text-align: center;
        background: $danger;
        color: $white;
        border-radius: 20px;
        height: 100%;
    }
    
    .error-icon {
        font-size: 4rem;
        color: $white;
        margin-bottom: 20px;
        opacity: 0.9;
    }
    
    .error-title {
        color: $white;
        font-weight: 700;
        margin-bottom: 10px;
        font-size: 2rem;
    }
    
    .error-message {
        color: rgba($white, 0.9);
        font-size: 1.2rem;
    }
    
    // Scanner Interface
    .scanner-interface {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .scanner-container {
        background: $light;
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 40px;
        box-shadow: $box-shadow;
        border: 1px solid $border-color;
        max-width: 800px;
        width: 100%;
    
        [data-bs-theme="dark"] & {
            background: $dark;
            color: $light;
        }
    }
    
    // Camera Scanner
    .camera-scanner {
        text-align: center;
    }
    
    .scanner-frame {
        position: relative;
        border-radius: 15px;
        overflow: hidden;
        margin-bottom: 20px;
        box-shadow: $box-shadow;
    }
    
    .scanner-overlay-frame {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
    }
    
    .corner {
        position: absolute;
        width: 30px;
        height: 30px;
        border: 3px solid $primary;
    
        &-tl {
            top: 20px;
            left: 20px;
            border-right: none;
            border-bottom: none;
        }
    
        &-tr {
            top: 20px;
            right: 20px;
            border-left: none;
            border-bottom: none;
        }
    
        &-bl {
            bottom: 20px;
            left: 20px;
            border-right: none;
            border-top: none;
        }
    
        &-br {
            bottom: 20px;
            right: 20px;
            border-left: none;
            border-top: none;
        }
    }
    
    .scanner-instructions {
        color: $gray-600;
        font-size: 0.95rem;
    
        i {
            color: $primary;
            margin-bottom: 10px;
            font-size: 1.2rem;
        }
    
        [data-bs-theme="dark"] & {
            color: $gray-400;
        }
    }
    
    // Laser Scanner
    .laser-scanner {
        text-align: center;
    }
    
    .laser-input-container {
        position: relative;
        margin-bottom: 20px;
    }
    
    .laser-icon {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: $primary;
        font-size: 1.2rem;
    }
    
    .laser-input {
        padding: 15px 15px 15px 50px;
        border: 2px solid $border-color;
        border-radius: 12px;
        font-size: 1.1rem;
        transition: all 0.3s ease;
        background: $light;
    
        &:focus {
            border-color: $primary;
            box-shadow: 0 0 0 3px rgba($primary, 0.1);
            outline: none;
        }
    }
    
    .laser-instructions {
        color: $gray-600;
        font-size: 0.95rem;
    
        i {
            color: $primary;
            margin-bottom: 10px;
            font-size: 1.2rem;
        }
    
        [data-bs-theme="dark"] & {
            color: $gray-400;
        }
    }
    
    // Error Alert
    .scanner-error {
        margin-top: 20px;
    }
    
    .error-alert {
        background: rgba($danger, 0.1);
        color: $danger;
        padding: 15px 20px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.95rem;
    }
    
    // Animations
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    // Responsive Design
    @media (max-width: 992px) {
        .ticket-scanner-container {
            padding: 8px;
        }
        .mode-title {
            font-size: 1.1rem;
            line-height: 1.1;
        }
        .help-indicator {
            padding: 6px;
            font-size: .8rem;
            font-weight: 600;
        }
        
        .scan-mode-section {
            padding: 8px;
            margin-bottom: 4px;
        }
        
        .mode-btn-group {
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }
        
        .mode-btn {
            min-width: 100%;
            max-width: 300px;
            padding: 10px 15px !important;
            border-radius: 15px !important;
        }
        
        .scanner-container {
            padding: 20px;
        }
        .scanner-overlay {
            padding: 0;
        }
        .overlay-content {
            margin: 5px;
            max-height: 100vh;
            max-width: 100vw;
        }
        
        .overlay-actions {
            padding-left: 20px;
            padding-right: 20px;
        }

        .mode-toggle-buttons {
            margin-bottom: 10px;
        }
        .mode-help-text {
            margin-top: 0;
        }
    }
    
    .qrcode-stream-camera {
        border-radius: $border-radius !important;
    }

    .ticket-counts {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px;
    }

    .ticket-type-count {
        background: rgba($white, 0.15);
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.95rem;
        font-weight: 500;
        white-space: nowrap;
    }
}