/* All your existing CSS styles remain the same */
:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--light-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.system-title {
    text-align: center;
    margin-bottom: 2rem;
}

.system-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.system-title .tagline {
    font-size: 1.125rem;
    color: #64748b;
    font-weight: 500;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-bottom: none;
}

.card-header h4,
.card-header h5 {
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Search Section */
.search-card {
    background: white;
}

.search-card .card-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-outline-primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #cbd5e1;
}

.btn-block {
    width: 100%;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.alert i {
    margin-top: 2px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--primary-color);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-section {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.info-section h6 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-section p {
    margin-bottom: 0.75rem;
    color: #475569;
    font-size: 0.9375rem;
}

.info-section strong {
    color: #1e293b;
    font-weight: 600;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}

/* Status Card */
.status-item {
    margin-bottom: 1.5rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.total-amount {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.total-amount p {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.total-amount h4 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
}

/* Bank Details */
.bank-details {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1.25rem;
}

.bank-details h6 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.bank-details p {
    margin-bottom: 0.75rem;
    color: #475569;
    font-size: 0.9375rem;
}

/* Payment Slip Preview */
.uploaded-slip {
    text-align: center;
}

.uploaded-slip h6 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.slip-preview {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.slip-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* Action Buttons Container */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive Layout */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Room Booking Styles */
.room-booking-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--light-bg);
}

.room-booking-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.room-booking-header h6 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.room-booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.room-booking-price {
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .container {
        padding: 30px 20px;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .layout-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .search-grid {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1rem;
        align-items: end;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .action-buttons {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 767px) {
    .card-body {
        padding: 1.25rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .total-amount h4 {
        font-size: 1.75rem;
    }
}

/* File Upload Styling */
.form-control-file {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--light-bg);
    cursor: pointer;
}

.form-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Printed booking sheet: hidden on screen, the only thing printed */
.print-section { display: none; }

@media print {
    @page { size: A4; margin: 14mm; }

    /* Hide the website itself: header, menus, footer, buttons, forms */
    body > .top-bar, body > .main-header, body > header, body > footer,
    .system-title, .page-title, .layout-grid, .search-card, main .alert { display: none !important; }
    body { background: #fff !important; }
    main { padding: 0 !important; min-height: 0 !important; }
    main .container { background: #fff !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; max-width: none !important; border-radius: 0 !important; }

    .print-section { display: block !important; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 10.5pt; line-height: 1.45; }
    .print-section * { color: #000 !important; }
    .print-section h1 { font-size: 18pt; margin: 2pt 0; letter-spacing: .02em; text-transform: uppercase; }
    .print-section h2 { font-size: 10pt; text-transform: uppercase; letter-spacing: .06em; margin: 14pt 0 5pt; padding-bottom: 3pt; border-bottom: 1px solid #000; }
    .print-section p { margin: 0 0 5pt; }
    .print-section table { width: 100%; border-collapse: collapse; }

    .ps-head { text-align: center; border-bottom: 3px double #000; padding-bottom: 9pt; margin-bottom: 10pt; }
    .ps-org { font-size: 11pt; font-weight: 700; margin: 0; }
    .ps-sub { font-size: 9.5pt; margin: 0; }

    .ps-meta td { border: 1px solid #000; padding: 6pt 8pt; vertical-align: top; width: 25%; }
    .ps-meta span { display: block; font-size: 8pt; text-transform: uppercase; letter-spacing: .05em; }
    .ps-meta strong { font-size: 11pt; }
    .ps-meta .ps-ref { font-family: "Courier New", monospace; font-size: 11.5pt; white-space: nowrap; }

    .ps-two td { width: 50%; vertical-align: top; padding-right: 14pt; }
    .ps-two td + td { padding-right: 0; padding-left: 14pt; }

    .ps-lines th, .ps-lines td { border: 1px solid #000; padding: 5pt 7pt; text-align: left; vertical-align: top; }
    .ps-lines th { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .04em; background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .ps-lines .ps-num { text-align: right; white-space: nowrap; }
    .ps-lines tbody td:nth-child(4), .ps-lines tbody td:nth-child(5), .ps-lines tbody td:nth-child(6) { white-space: nowrap; }
    .ps-lines th:first-child { width: 34%; }
    .ps-lines tfoot td { font-weight: 600; }
    .ps-lines .ps-total td { font-size: 12pt; font-weight: 700; border-top: 2px solid #000; }
    .ps-lines tr { page-break-inside: avoid; }

    .ps-note { margin-top: 9pt !important; }
    .ps-box { border: 1.5px solid #000; padding: 7pt 9pt; margin: 10pt 0 0 !important; page-break-inside: avoid; }
    .ps-box p:last-child { margin-bottom: 0; }
    .ps-notes { margin: 10pt 0 0; padding-left: 14pt; font-size: 9.5pt; }
    .ps-notes li { margin-bottom: 3pt; }
    .ps-foot { margin-top: 14pt !important; padding-top: 7pt; border-top: 3px double #000; font-size: 8.5pt; text-align: center; }
}

/* PDF Export Button */
.export-pdf-btn {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.export-pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ---- additions: timer, payment options, reschedule ---- */
.timer-box { margin-top: 16px; background: #FEF3C7; border: 1px solid #F59E0B; border-radius: 12px; padding: 14px; text-align: center; }
.timer-box.expired { background: #FEE2E2; border-color: #EF4444; }
.timer-label { font-size: 13px; font-weight: 600; color: #92400E; text-transform: uppercase; letter-spacing: .04em; }
.timer-value { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; color: #78350F; line-height: 1.2; }
.timer-sub { font-size: 12px; color: #92400E; }
.pay-option { border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.pay-option h6 { font-weight: 700; margin: 0 0 10px; }
.inline-form { margin-top: 12px; }
.inline-form label, .resched-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #475569; }
.resched-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.resched-row .form-control { flex: 1; min-width: 180px; }
.resched-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-color); }
.pb-line { display: flex; justify-content: space-between; margin: 6px 0; color: #475569; }
.pb-discount { color: #059669; font-weight: 600; }
.badge-info { background: #0ea5e9; color: #fff; }

/* Reschedule request box */
.resched-box { margin-top: 18px; padding: 16px 18px; border: 1px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; }
.resched-box h6 { font-weight: 700; margin: 0 0 10px; }
.resched-note { margin: 0 0 8px; color: #475569; }
.resched-wait { color: #92400E; background: #FEF3C7; border-radius: 8px; padding: 10px 12px; }
.resched-no { color: #991B1B; background: #FEE2E2; border-radius: 8px; padding: 10px 12px; }
