:root {
    --payment-primary: #046F5E;
    --payment-success: #10b981;
    --payment-danger: #ef4444;
    --payment-warning: #f59e0b;
    --payment-pending: #6366f1;
    --payment-border: rgba(17, 24, 39, 0.1);
    --payment-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --payment-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.payment-module-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem;
    margin-top: 1.25rem;
    border: 1px solid #e0e7ff;
    border-radius: 0.625rem;
    background: #fafbff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Payment Header */
.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #e0e7ff;
}

.payment-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.payment-title i {
    color: var(--payment-primary);
    font-size: 1.25rem;
}

.payment-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.payment-status-pending {
    background-color: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.payment-status-completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--payment-success);
}

.payment-status-failed {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--payment-danger);
}

.payment-status-cancelled {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Payment Body */
.payment-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-amount-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(4, 111, 94, 0.05) 0%, rgba(14, 159, 136, 0.05) 100%);
    border-radius: 0.5rem;
    border-left: 4px solid var(--payment-primary);
}

.payment-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.payment-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--payment-primary);
    letter-spacing: -0.02em;
}

/* Payment Details */
.payment-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 0.5rem;
    border: 1px solid var(--payment-border);
}

.payment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.detail-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 600;
    word-break: break-word;
    text-align: right;
}

.payment-error-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.875rem;
    margin-top: 0.5rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--payment-danger);
    border-radius: 0.375rem;
}

.payment-error-message i {
    color: var(--payment-danger);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.payment-error-message span {
    font-size: 0.875rem;
    color: #7f1d1d;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.payment-method-option {
    position: relative;
    cursor: pointer;
}

.payment-method-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.method-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #fff;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.method-content i {
    font-size: 1.375rem;
    color: var(--payment-primary);
}

.payment-method-option input:checked + .method-content {
    border-color: var(--payment-primary);
    background-color: rgba(4, 111, 94, 0.08);
    box-shadow: 0 0 0 2px rgba(4, 111, 94, 0.15);
    color: #111827;
}

/* Payment Form */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--payment-primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(4, 111, 94, 0.2);
}

.payment-submit-btn:hover {
    background: #05573f;
    box-shadow: 0 4px 12px rgba(4, 111, 94, 0.3);
}

.payment-submit-btn:active {
    transform: scale(0.98);
}

/* Success Message */
.payment-success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--payment-success);
    font-size: 2rem;
    animation: scaleIn 0.5s ease;
}

.payment-success-message p {
    margin: 0;
    font-size: 1rem;
    color: #111827;
}

.payment-success-message p.text-muted {
    color: #64748b;
    font-size: 0.875rem;
}

/* Pending Message */
.payment-pending-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 0.5rem;
    color: #4f46e5;
    font-weight: 500;
}

.payment-pending-message i {
    font-size: 1.5rem;
    animation: spin 2s linear infinite;
}

.payment-pending-message p {
    margin: 0;
}

/* Animations */
@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Tablet View (768px and below) */
@media (max-width: 768px) {
    .payment-module-card {
        padding: 1rem;
        gap: 1rem;
    }

    .payment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding-bottom: 0.75rem;
    }

    .payment-title {
        font-size: 0.95rem;
    }

    .payment-status-badge {
        align-self: flex-start;
        font-size: 0.8rem;
        padding: 0.4rem 0.875rem;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .method-content {
        padding: 0.75rem;
        font-size: 0.75rem;
    }

    .method-content i {
        font-size: 1.25rem;
    }

    .payment-submit-btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Mobile View (480px and below) */
@media (max-width: 480px) {
    .payment-module-card {
        padding: 0.875rem;
        gap: 0.875rem;
        border-radius: 0.5rem;
    }

    .payment-header {
        padding-bottom: 0.625rem;
        gap: 0.4rem;
        border-bottom: 1px solid #e0e7ff;
    }

    .payment-title {
        font-size: 0.9rem;
        gap: 0.4rem;
    }

    .payment-title i {
        font-size: 1.1rem;
    }

    .payment-status-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.625rem;
        gap: 0.3rem;
    }

    .payment-status-badge i {
        font-size: 0.75rem;
    }

    .payment-details {
        padding: 0.75rem;
        gap: 0.4rem;
    }

    .payment-detail-row {
        padding: 0.35rem 0;
        flex-direction: row;
    }

    .detail-label,
    .detail-value {
        font-size: 0.75rem;
    }

    .detail-value {
        text-align: right;
    }

    .payment-error-message {
        padding: 0.625rem;
        gap: 0.4rem;
    }

    .payment-error-message i {
        font-size: 0.8rem;
        margin-top: 0.05rem;
    }

    .payment-error-message span {
        font-size: 0.75rem;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .method-content {
        padding: 0.625rem;
        font-size: 0.7rem;
        gap: 0.3rem;
    }

    .method-content i {
        font-size: 1rem;
    }

    .payment-form {
        gap: 0.625rem;
    }

    .payment-submit-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        gap: 0.4rem;
    }

    .payment-success-message {
        padding: 1.25rem 0.875rem;
        gap: 0.625rem;
    }

    .success-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }

    .payment-success-message p {
        font-size: 0.85rem;
    }

    .payment-success-message p.text-muted {
        font-size: 0.75rem;
    }

    .payment-pending-message {
        padding: 0.875rem;
        gap: 0.625rem;
        font-size: 0.8rem;
    }

    .payment-pending-message i {
        font-size: 1.1rem;
    }
}

/* Extra Small Devices (320px and below) */
@media (max-width: 320px) {
    .payment-module-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .payment-title {
        font-size: 0.85rem;
    }

    .payment-title i {
        font-size: 1rem;
    }

    .payment-status-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.55rem;
    }

    .payment-methods {
        gap: 0.4rem;
    }

    .method-content {
        padding: 0.55rem;
        font-size: 0.65rem;
    }

    .method-content i {
        font-size: 0.9rem;
    }

    .payment-submit-btn {
        padding: 0.6rem 0.875rem;
        font-size: 0.8rem;
    }
}

/* Utility Classes */
.text-muted {
    color: #64748b;
}

/* Transitions and Effects */
.payment-method-option input:focus-visible + .method-content {
    outline: 2px solid var(--payment-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .payment-form {
        display: none;
    }

    .payment-submit-btn {
        display: none;
    }
}

/* Event card layout: the cover image column was removed, so the body owns the
   full card width instead of being trapped in the old 168px image track. */
.dashboard-event-card {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-event-body {
    min-width: 0;
}

.dashboard-event-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-event-heading h3 {
    margin: 0;
    min-width: 0;
}

/* The badge is absolutely positioned to overlay the cover image, which this card
   no longer has — left as-is it anchors to an outer container and drifts over the
   section header. Scoped so the saved-events cards keep their overlay. */
.dashboard-event-heading .dashboard-status {
    position: static;
    background: #f3f4f6;
    backdrop-filter: none;
}

/* Availability Card Styles */
.availability-card {
    min-width: 0;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.availability-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.availability-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

/* Availability Form */
.availability-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Availability Buttons */
.availability-buttons {
    display: grid;
    /* minmax(0, 1fr) lets the columns shrink below their content width so the
       buttons never spill outside a narrow card. */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.availability-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.625rem;
    background-color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.availability-btn i {
    font-size: 1.25rem;
}

.available-btn {
    color: var(--payment-success);
    border-color: #d1fae5;
}

.available-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--payment-success);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.available-btn:active {
    background-color: rgba(16, 185, 129, 0.15);
    transform: translateY(0);
}

.not-available-btn {
    color: var(--payment-danger);
    border-color: #fee2e2;
}

.not-available-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--payment-danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.not-available-btn:active {
    background-color: rgba(239, 68, 68, 0.15);
    transform: translateY(0);
}

/* Dashboard filter bar */
.dashboard-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.dashboard-filter-search {
    position: relative;
    flex: 1 1 240px;
    min-width: 0;
}

.dashboard-filter-search i {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #9ca3af;
    pointer-events: none;
}

.dashboard-filter-search input {
    width: 100%;
    padding: 0.6rem 0.85rem 0.6rem 2.2rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    color: #111827;
}

.dashboard-filter-bar select {
    padding: 0.6rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.85rem;
    color: #111827;
    cursor: pointer;
}

.dashboard-filter-search input:focus,
.dashboard-filter-bar select:focus {
    outline: none;
    border-color: var(--payment-primary);
    box-shadow: 0 0 0 3px rgba(4, 111, 94, 0.12);
}

.dashboard-filter-submit {
    padding: 0.6rem 1.25rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--payment-primary);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dashboard-filter-submit:hover {
    background: #05573f;
}

.dashboard-filter-clear {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: underline;
}

.dashboard-filter-clear:hover {
    color: var(--payment-danger);
}

/* Pagination footer */
.dashboard-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.dashboard-pagination > span {
    font-size: 0.82rem;
    color: #6b7280;
}

.dashboard-pagination .pagination {
    margin: 0;
}

@media (max-width: 575px) {
    .dashboard-filter-bar {
        gap: 0.5rem;
    }

    .dashboard-filter-search {
        flex: 1 1 100%;
    }

    .dashboard-filter-bar select,
    .dashboard-filter-submit {
        flex: 1 1 auto;
    }

    .dashboard-pagination {
        justify-content: center;
    }

    .dashboard-pagination > span {
        width: 100%;
        text-align: center;
    }
}

/* Dashboard tables: each row collapses into its own card below tablet width,
   so a five-column table never forces horizontal scrolling on a phone. */
@media (max-width: 767px) {
    .dashboard-events-section .table,
    .dashboard-events-section .table tbody,
    .dashboard-events-section .table tr,
    .dashboard-events-section .table td {
        display: block;
        width: 100%;
    }

    .dashboard-events-section .table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .dashboard-events-section .table tr {
        margin-bottom: 0.875rem;
        padding: 0.25rem 0;
        border: 1px solid #e5e7eb;
        border-radius: 0.625rem;
        background: #fff;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    }

    .dashboard-events-section .table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.875rem;
        padding: 0.6rem 0.875rem;
        border: 0;
        text-align: right;
    }

    .dashboard-events-section .table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 0.75rem;
        font-weight: 600;
        color: #6b7280;
        text-align: left;
    }

    /* The event name heads the card: full width, no label, left aligned. */
    .dashboard-events-section .table td.dashboard-cell-title {
        display: block;
        padding: 0.75rem 0.875rem;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid #f3f4f6;
        font-weight: 600;
        color: #111827;
        text-align: left;
    }

    .dashboard-events-section .table td.dashboard-cell-title::before {
        content: none;
    }

    .dashboard-events-section .table td.text-end {
        text-align: right;
    }

    .dashboard-table-actions,
    .availability-inline-form {
        justify-content: flex-end;
    }

    .dashboard-events-section .table .dashboard-event-btn {
        width: auto;
    }
}

/* Compact availability controls inside a table cell */
.availability-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.availability-inline-form .availability-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
    border-radius: 0.375rem;
}

.availability-inline-form .availability-btn i {
    font-size: 0.85rem;
}

.availability-inline-form .availability-btn:hover {
    transform: none;
    box-shadow: none;
}

/* Table action clusters */
.dashboard-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* QR trigger in the QR codes table */
.dashboard-qr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    color: var(--payment-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-qr-btn:hover {
    border-color: var(--payment-primary);
    background: rgba(4, 111, 94, 0.08);
    box-shadow: 0 4px 12px rgba(4, 111, 94, 0.18);
}

.qr-dialog-title {
    margin: 0 0 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

/* The shared .event-qr-box caps at 180px; the popup wants it bigger. */
.event-qr-box-lg {
    display: flex;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: #fff;
}

.event-qr-box-lg img,
.event-qr-box-lg canvas {
    width: min(240px, 100%);
    height: auto;
}

/* Availability Display */
.availability-display {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.availability-badge i {
    font-size: 1.5rem;
}

.badge-available {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--payment-success);
}

.badge-not-available {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--payment-danger);
}


.badge-available {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--payment-success);
}

.badge-not-available {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--payment-danger);
}

.user-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-secondary-btn:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.user-secondary-btn:active {
    transform: translateY(0);
}

/* Give each event card the full row once two columns stop fitting the
   availability controls comfortably. */
@media (max-width: 1200px) {
    .dashboard-events-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Tablet View - Availability */
@media (max-width: 768px) {
    .availability-card {
        padding: 1.25rem;
    }

    .availability-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .availability-header h4 {
        font-size: 1rem;
    }

    .availability-buttons {
        gap: 0.75rem;
    }

    .availability-btn {
        padding: 0.9rem 1.25rem;
        font-size: 0.95rem;
        gap: 0.6rem;
    }

    .availability-btn i {
        font-size: 1.1rem;
    }

    .availability-badge {
        font-size: 0.95rem;
        padding: 0.75rem 1.25rem;
        gap: 0.6rem;
    }

    .availability-badge i {
        font-size: 1.25rem;
    }
}

/* Mobile View - Availability */
@media (max-width: 480px) {
    .availability-card {
        padding: 1.125rem;
        margin-top: 1rem;
    }

    .availability-header {
        margin-bottom: 0.875rem;
        padding-bottom: 0.75rem;
    }

    .availability-header h4 {
        font-size: 0.95rem;
    }

    .availability-buttons {
        gap: 0.65rem;
    }

    .availability-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        gap: 0.5rem;
        border-radius: 0.5rem;
    }

    .availability-btn i {
        font-size: 1rem;
    }

    .availability-btn span {
        font-weight: 600;
    }

    .availability-badge {
        font-size: 0.9rem;
        padding: 0.65rem 1rem;
        gap: 0.5rem;
    }

    .availability-badge i {
        font-size: 1.1rem;
    }
}

/* Stack the two choices once side-by-side buttons get too cramped to read. */
@media (max-width: 380px) {
    .availability-buttons {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Extra Small Devices - Availability */
@media (max-width: 320px) {
    .availability-card {
        padding: 1rem;
        margin-top: 0.875rem;
    }

    .availability-header h4 {
        font-size: 0.9rem;
    }

    .availability-buttons {
        gap: 0.5rem;
    }

    .availability-btn {
        padding: 0.7rem 0.875rem;
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .availability-btn i {
        font-size: 0.95rem;
    }

    .availability-badge {
        font-size: 0.8rem;
        padding: 0.6rem 0.875rem;
        gap: 0.4rem;
    }

    .availability-badge i {
        font-size: 1rem;
    }
}

/* QR Code Upload Styles */
.qr-upload-card {
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qr-upload-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.qr-upload-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.qr-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qr-upload-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-file-input {
    display: none;
}

.qr-upload-label {
    width: 100%;
    padding: 2rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.qr-upload-label:hover {
    border-color: var(--payment-primary);
    background-color: rgba(4, 111, 94, 0.05);
}

.qr-upload-label:active {
    background-color: rgba(4, 111, 94, 0.1);
}

.qr-file-input:focus + .qr-upload-label {
    border-color: var(--payment-primary);
    box-shadow: 0 0 0 3px rgba(4, 111, 94, 0.1);
}

.qr-upload-icon {
    font-size: 3rem;
    color: var(--payment-primary);
}

.qr-upload-text {
    margin: 0;
    text-align: center;
}

.qr-upload-main {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.qr-upload-sub {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.qr-error-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.875rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--payment-danger);
    border-radius: 0.375rem;
}

.qr-error-message i {
    color: var(--payment-danger);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.qr-error-message span {
    font-size: 0.875rem;
    color: #7f1d1d;
}

.qr-uploaded-info {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.875rem;
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--payment-success);
    border-radius: 0.375rem;
}

.qr-uploaded-info i {
    color: var(--payment-success);
    font-size: 1rem;
    flex-shrink: 0;
}

.qr-uploaded-info span {
    font-size: 0.875rem;
    color: #065f46;
}

.qr-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: var(--payment-primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(4, 111, 94, 0.2);
}

.qr-submit-btn:hover {
    background: #05573f;
    box-shadow: 0 4px 12px rgba(4, 111, 94, 0.3);
    transform: translateY(-1px);
}

.qr-submit-btn:active {
    transform: translateY(0);
}

/* Current QR preview */
.qr-current {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid #dcfce7;
    border-radius: 0.625rem;
    background-color: #f0fdf4;
}

.qr-current-thumb {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    padding: 0.35rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qr-current-thumb:hover {
    border-color: var(--payment-primary);
    box-shadow: 0 4px 12px rgba(4, 111, 94, 0.18);
}

.qr-current-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qr-current-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.qr-current-meta strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.qr-current-meta span {
    font-size: 0.8rem;
    color: #6b7280;
}

.qr-current-view {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--payment-primary);
    cursor: pointer;
}

.qr-current-view:hover {
    text-decoration: underline;
}

/* Full-size popup. Centring is set explicitly rather than relying on the UA
   default, which the site's base CSS overrides (see .user-logout-dialog). */
.qr-preview-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    box-sizing: border-box;
    width: min(380px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 1.5rem;
    border: 0;
    border-radius: 0.875rem;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.qr-preview-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.qr-preview-dialog img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 0.5rem;
}

.qr-preview-dialog p {
    margin: 0.875rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.qr-preview-close {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 1.35rem;
    line-height: 1;
    color: #4b5563;
    cursor: pointer;
}

.qr-preview-close:hover {
    background: #e5e7eb;
}

@media (max-width: 480px) {
    .qr-current {
        gap: 0.75rem;
        padding: 0.875rem;
    }

    .qr-current-thumb {
        width: 72px;
        height: 72px;
    }

    .qr-current-meta strong {
        font-size: 0.875rem;
    }

    .qr-current-meta span {
        font-size: 0.75rem;
    }

    .qr-preview-dialog {
        padding: 1.25rem;
    }
}

/* Tablet View - QR Upload */
@media (max-width: 768px) {
    .qr-upload-card {
        padding: 1.25rem;
    }

    .qr-upload-label {
        padding: 1.5rem;
    }

    .qr-upload-icon {
        font-size: 2.5rem;
    }

    .qr-upload-main {
        font-size: 0.95rem;
    }

    .qr-submit-btn {
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Mobile View - QR Upload */
@media (max-width: 480px) {
    .qr-upload-card {
        padding: 1.125rem;
        margin-top: 1rem;
    }

    .qr-upload-header {
        margin-bottom: 0.875rem;
        padding-bottom: 0.75rem;
    }

    .qr-upload-header h4 {
        font-size: 1rem;
    }

    .qr-upload-label {
        padding: 1.5rem 1rem;
        gap: 0.5rem;
    }

    .qr-upload-icon {
        font-size: 2.25rem;
    }

    .qr-upload-main {
        font-size: 0.9rem;
    }

    .qr-upload-sub {
        font-size: 0.8rem;
    }

    .qr-submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }
}

/* Extra Small Devices - QR Upload */
@media (max-width: 320px) {
    .qr-upload-card {
        padding: 1rem;
    }

    .qr-upload-label {
        padding: 1.25rem 0.875rem;
    }

    .qr-upload-icon {
        font-size: 2rem;
    }

    .qr-upload-main {
        font-size: 0.85rem;
    }

    .qr-upload-sub {
        font-size: 0.75rem;
    }

    .qr-submit-btn {
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }
}

/* QR Upload Container */
.qr-upload-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.qr-info-section {
    padding: 1.5rem;
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 0.75rem;
}

.qr-info-section h5 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.qr-info-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.qr-info-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #374151;
}

.qr-info-list i {
    color: var(--payment-success);
    font-size: 1.1rem;
    flex-shrink: 0;
}


/* Responsive QR Upload Container */
@media (max-width: 768px) {
    .qr-upload-container {
        gap: 1.5rem;
    }

    .qr-info-section {
        padding: 1.25rem;
    }

    .qr-info-list li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .qr-upload-container {
        gap: 1rem;
    }

    .qr-info-section {
        padding: 1rem;
    }

    .qr-info-section h5 {
        font-size: 0.95rem;
    }

    .qr-info-list li {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .qr-info-list i {
        font-size: 1rem;
    }
}
