:root {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --primary: #0f58d6;
    --primary-glow: rgba(15, 88, 214, 0.3);
    --accent: #10b981;
    --text-light: #0f172a;
    --text-muted: #64748b;
}

/* Scoped wrapper for the registration pages */
.queue-registration-wrap {
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.glass-panel {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Step 1 Cards */
.service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.service-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon-red { background: #fee2e2; color: #ef4444; }
.service-icon-green { background: #d1fae5; color: #10b981; }
.service-icon-blue { background: #e0e7ff; color: #3b82f6; }

.service-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
}

.service-badge-red { background: #fee2e2; color: #ef4444; }
.service-badge-green { background: #d1fae5; color: #10b981; }
.service-badge-blue { background: #e0e7ff; color: #3b82f6; }

.service-card .card-title {
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 700;
}

.service-card .card-text {
    color: var(--text-muted);
}

/* Step 2 Form */
.registration-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.queue-registration-wrap .form-control {
    background-color: #f1f5f9;
    border: 1px solid transparent;
    color: var(--text-light);
    border-radius: 8px;
    padding: 12px 15px;
}

.queue-registration-wrap .form-control:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--primary-glow);
    color: var(--text-light);
}

.queue-registration-wrap .form-control::placeholder {
    color: #94a3b8;
}

.queue-registration-wrap .form-control.readonly-field {
    background-color: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
    cursor: not-allowed;
}

.queue-registration-wrap .phone-input-group .input-group-text.phone-prefix {
    background-color: #f1f5f9;
    border: 1px solid transparent;
    border-right: 0;
    color: var(--text-light);
    border-radius: 8px 0 0 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: calc(1.5em + 24px + 2px);
    line-height: 1.5;
}

.queue-registration-wrap .phone-input-group .form-control {
    border-radius: 0 8px 8px 0;
    height: auto;
}

.queue-registration-wrap .phone-input-group .form-control:focus {
    z-index: 3;
}

.queue-registration-wrap .phone-input-group {
    align-items: stretch;
}

.queue-registration-wrap .phone-input-group .input-group-prepend {
    display: flex;
}

.phone-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.phone-code {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.queue-registration-wrap label {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.queue-registration-wrap .text-muted {
    color: var(--text-muted) !important;
}

.queue-registration-wrap .btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.queue-registration-wrap .btn-primary:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.queue-registration-wrap .btn-outline-secondary {
    border: 1px solid #cbd5e1;
    color: var(--text-light);
    border-radius: 8px;
    font-weight: 600;
    background: #ffffff;
}

.queue-registration-wrap .btn-outline-secondary:hover {
    background-color: #f8fafc;
    color: var(--text-light);
    border-color: #94a3b8;
}

/* Success Page */
.success-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    color: var(--text-light);
}

.queue-number-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
}

.queue-number-box .queue-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: none;
}

/* Header Text */
.page-title {
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.queue-print-page {
    padding-left: 1rem;
    padding-right: 1rem;
}

.queue-print-receipt {
    width: 80mm;
    max-width: 100%;
    background: #ffffff;
    color: #000000;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    padding: 14px 12px 18px;
    font-family: "Courier New", monospace;
    line-height: 1.35;
}

.queue-print-receipt table,
.queue-print-receipt td,
.queue-print-receipt th {
    color: #000000;
    font-weight: bold;
}

.queue-print-receipt strong {
    font-weight: 800;
    color: #000000;
}

.queue-print-center {
    text-align: center;
}

.queue-print-logo-wrap {
    text-align: center;
    margin-bottom: 8px;
}

.queue-print-logo {
    max-width: 120px;
    max-height: 48px;
    object-fit: contain;
}

.queue-print-company-name {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    color: #000000;
}

.queue-print-company-line,
.queue-print-service,
.queue-print-status,
.queue-print-footer,
.queue-print-line,
.queue-print-number-label {
    font-size: 13px;
    font-weight: bold;
    color: #000000;
}

.queue-print-datetime {
    font-size: 15px;
    font-weight: 800;
    color: #000000;
}

.queue-print-divider {
    text-align: center;
    letter-spacing: 0.5px;
    margin: 8px 0;
    color: #000000;
    font-weight: bold;
}

.queue-print-number-label {
    text-align: center;
    text-transform: uppercase;
    font-weight: 800;
    color: #000000;
}

.queue-print-number {
    text-align: center;
    font-size: 54px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 8px 0 10px;
    color: #000000;
}

.wo-print-number {
    text-align: center;
    font-size: 27px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 8px 0 10px;
    color: #000000;
}

.queue-print-service,
.queue-print-datetime,
.queue-print-status,
.queue-print-footer {
    text-align: center;
    font-weight: bold;
    color: #000000;
}

.queue-print-status {
    margin-top: 8px;
    font-weight: bold;
    color: #000000;
}

.queue-print-customer {
    margin-top: 8px;
    font-weight: bold;
    color: #000000;
}

.queue-print-hint {
    margin-top: 10px;
    color: #000000;
    font-size: 12px;
    font-weight: bold;
}

/* Custom Dark Theme for Select2 (Operating Unit Dropdown) */
.queue-registration-wrap .select2-container--default .select2-selection--single {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    height: 48px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.queue-registration-wrap .select2-container--default .select2-selection--single:hover {
    border-color: #94a3b8;
}

.queue-registration-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
    line-height: normal;
    padding-left: 15px;
}

.queue-registration-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    width: 40px;
}

.queue-registration-wrap .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent;
}

.queue-registration-wrap .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #64748b transparent;
}

.queue-registration-wrap .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

.queue-registration-wrap .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    cursor: not-allowed;
    opacity: 0.8;
}

.select2-dropdown {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    color: #0f172a;
    overflow: hidden;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    border-radius: 6px;
    padding: 8px 12px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: #3b82f6;
}

.select2-container--default .select2-results__option {
    color: #0f172a;
    padding: 12px 16px;
    font-size: 1rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #eff6ff;
    color: #1e40af;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e0e7ff;
}

@page {
    size: 80mm auto;
    margin: 4mm;
}

@media print {
    html,
    body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body * {
        visibility: hidden;
    }

    .queue-print-receipt,
    .queue-print-receipt * {
        visibility: visible;
        color: #000000 !important;
        font-weight: bold !important;
    }

    .queue-print-receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 72mm;
        max-width: 72mm;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        font-family: "Courier New", monospace;
        font-weight: bold !important;
    }

    .no-print,
    header,
    footer {
        display: none !important;
    }
}

/* Flash Message Alert Styles */
.queue-registration-wrap .alert-danger {
    background-color: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    border-radius: 12px;
    padding: 12px 16px;
}

.queue-registration-wrap .alert-danger .not-found-product {
    color: #ef4444;
    font-weight: 600;
}

.queue-registration-wrap .alert-warning {
    background-color: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #fde047;
    border-radius: 12px;
    padding: 12px 16px;
}

.queue-registration-wrap .alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    border-radius: 12px;
    padding: 12px 16px;
}
