/* ============================================
   PREMIUM BOOKING SYSTEM - Design System
   ============================================ */

/* Root Variables - Premium Color Palette */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);

    --accent: #8b5cf6;
    --accent-light: #a78bfa;

    --success: #22c55e;
    --success-light: #4ade80;
    --success-bg: rgba(34, 197, 94, 0.08);

    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: rgba(245, 158, 11, 0.08);

    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-bg: rgba(239, 68, 68, 0.08);

    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --bg-hover: #f8fafc;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-dim: #cbd5e1;

    --border: #e2e8f0;
    --border-focus: #6366f1;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --shadow-btn: 0 4px 14px rgba(99, 102, 241, 0.35);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 999px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: all 0.3s var(--ease);
    --transition-fast: all 0.15s var(--ease);

    --font-bn: 'Noto Sans Bengali', 'Segoe UI', sans-serif;
    --font-en: 'Inter', 'Segoe UI', sans-serif;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-body: #0c0f1a;
    --bg-card: #151929;
    --bg-input: #1e2339;
    --bg-hover: #1e2339;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    --border: #1e293b;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.35);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-bn);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 197, 94, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER - Glassmorphism
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(21, 25, 41, 0.8);
    border-bottom-color: rgba(30, 41, 59, 0.6);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.55rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.icon-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    color: white;
}

.icon-btn:hover::before {
    opacity: 1;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}

/* Theme Toggle Icons */
.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding: 2rem 1rem;
    min-height: calc(100vh - 64px);
}

/* ============================================
   BOOKING CARD - Premium Glass Card
   ============================================ */
.booking-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    position: relative;
}

.booking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
    z-index: 1;
}

.card-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    animation: headerShimmer 8s ease-in-out infinite;
}

@keyframes headerShimmer {
    0%, 100% { transform: translate(-30%, -30%); }
    50% { transform: translate(30%, 30%); }
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
   BOOKING FORM
   ============================================ */
.booking-form {
    padding: 2rem;
}

/* Booking Type Selector - Premium Toggle */
.booking-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
    background: var(--bg-input);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.type-btn {
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    font-family: var(--font-bn);
    position: relative;
}

.type-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.type-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm), 0 0 0 3px var(--primary-glow);
}

.type-btn svg {
    width: 18px;
    height: 18px;
}

/* Booking Section */
.booking-section { display: none; }
.booking-section.active { display: block; animation: fadeSlideIn 0.3s ease; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Title */
.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* ============================================
   FORM ELEMENTS - Premium Inputs
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.required {
    color: var(--danger);
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: var(--font-bn);
    outline: none;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--text-dim);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-card);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

[data-theme="dark"] .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.form-group select option {
    padding: 0.5rem;
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.helper-text {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   DATE PREVIEW - Premium Gradient Card
   ============================================ */
.date-preview {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #a855f7 100%);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md), 0 4px 20px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.date-preview::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1fr;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.preview-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-value {
    font-size: 1rem;
    color: white;
    font-weight: 700;
}

.preview-item.total {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.preview-divider {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* ============================================
   SUBMIT BUTTON - Premium Animated
   ============================================ */
.form-actions {
    margin-top: 2rem;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-family: var(--font-bn);
    letter-spacing: -0.01em;
    box-shadow: var(--shadow-btn);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

.submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-text { display: inline-block; }

.btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .btn-loader { display: inline-block; }

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

/* ============================================
   BOOKING PROGRESS
   ============================================ */
.booking-progress {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.booking-progress.hidden { display: none; }

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.progress-header span {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 700;
    font-family: var(--font-en);
}

.progress-bar-container {
    background: var(--bg-input);
    border-radius: var(--radius-full);
    height: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
    background-size: 200% 100%;
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: var(--radius-full);
    animation: progressShimmer 2s linear infinite;
    position: relative;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.booking-results {
    max-height: 450px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.25rem;
}

/* ============================================
   RESULT ITEMS - Enhanced Cards
   ============================================ */
.result-item {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    border: 1px solid var(--border);
    background: var(--bg-input);
    transition: var(--transition-fast);
    animation: resultSlideIn 0.3s var(--ease-bounce);
}

@keyframes resultSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.result-item:hover {
    box-shadow: var(--shadow-sm);
}

.result-item.success {
    border-color: rgba(34, 197, 94, 0.3);
    background: var(--success-bg);
}

.result-item.duplicate {
    border-color: rgba(245, 158, 11, 0.3);
    background: var(--warning-bg);
}

.result-item.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: var(--danger-bg);
}

.result-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.result-icon.success { color: var(--success); }
.result-icon.warning { color: var(--warning); }
.result-icon.error { color: var(--danger); }

.result-content { flex: 1; }

.result-date-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.result-date {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.result-date-api {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-en);
}

.result-status {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.result-status.success { color: var(--success); }
.result-status.warning { color: var(--warning); }
.result-status.error { color: var(--danger); }

.result-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   SERIAL INFO - In Result Items
   ============================================ */
.serial-info {
    margin-top: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.serial-info.new-serial {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.serial-info.duplicate {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.serial-info.failed-serial {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.serial-badge-inline {
    font-size: 0.68rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.serial-badge-inline.new-serial {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.serial-badge-inline.duplicate {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.serial-badge-inline.failed-serial {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.serial-number-display {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.serial-number-display strong {
    font-size: 1.1rem;
    color: var(--primary);
    font-family: var(--font-en);
}

.serial-note {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 400;
    width: 100%;
}

/* ============================================
   RECEIPT SECTION
   ============================================ */
.receipt-section {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.receipt-section.hidden { display: none; }

.receipt-header {
    text-align: center;
    margin-bottom: 2rem;
}

.receipt-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.receipt-preview {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}

.receipt-content {
    padding: 2rem;
    color: #1f2937;
}

.receipt-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.receipt-logo h1 {
    font-size: 1.75rem;
    color: #4f46e5;
    margin-bottom: 0.5rem;
    font-weight: 900;
    font-family: var(--font-en);
    letter-spacing: -0.03em;
}

.receipt-logo p {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

.receipt-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 1.5rem 0;
}

.receipt-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4f46e5;
}

.receipt-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.info-row.highlight {
    background: #eff6ff;
    border: 1px solid #93c5fd;
}

.info-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
}

.info-value {
    color: #1e293b;
    text-align: right;
    max-width: 60%;
    word-wrap: break-word;
    font-weight: 500;
}

/* Receipt Stats */
.receipt-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
    margin-top: 1rem;
}

.stat-box {
    text-align: center;
    padding: 1.25rem 0.75rem;
    border-radius: var(--radius-md);
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-box.success-stat { background: rgba(34, 197, 94, 0.06); border-color: #22c55e; }
.stat-box.success-stat::before { background: #22c55e; }
.stat-box.warning-stat { background: rgba(245, 158, 11, 0.06); border-color: #f59e0b; }
.stat-box.warning-stat::before { background: #f59e0b; }
.stat-box.error-stat { background: rgba(239, 68, 68, 0.06); border-color: #ef4444; }
.stat-box.error-stat::before { background: #ef4444; }

.stat-number {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    font-family: var(--font-en);
}

.success-stat .stat-number { color: #16a34a; }
.warning-stat .stat-number { color: #d97706; }
.error-stat .stat-number { color: #dc2626; }

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

/* ============================================
   SERIAL LIST - Receipt Items
   ============================================ */
.serial-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 420px;
    overflow-y: auto;
}

.serial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border-left: 4px solid #22c55e;
    gap: 1rem;
    transition: var(--transition-fast);
}

.serial-item:hover { box-shadow: var(--shadow-xs); }

.serial-item.duplicate { background: #fffbeb; border-left-color: #f59e0b; }
.serial-item.failed { background: #fef2f2; border-left-color: #ef4444; }

.serial-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.serial-index {
    width: 28px;
    height: 28px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
    font-family: var(--font-en);
}

.serial-item.duplicate .serial-index { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.serial-item.failed .serial-index { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

.serial-date-info {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.serial-date {
    font-weight: 700;
    color: #334155;
    font-size: 0.85rem;
    font-family: var(--font-en);
}

.serial-date-formatted {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 400;
}

.serial-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.serial-badge {
    font-size: 0.62rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.serial-badge.new-badge { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.serial-badge.dup-badge { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.serial-badge.fail-badge { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

.serial-number {
    font-size: 1.3rem;
    font-weight: 900;
    color: #1e293b;
    font-family: var(--font-en);
}

.serial-item.duplicate .serial-number { color: #92400e; }
.serial-item.failed .serial-number { display: none; }

.serial-dup-note { font-size: 0.62rem; color: #d97706; font-weight: 500; text-align: right; }
.serial-fail-msg { font-size: 0.72rem; color: #dc2626; font-weight: 500; text-align: right; max-width: 200px; }

/* Serial Summary */
.serial-summary {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border-radius: var(--radius-md);
    border: 1px solid #c7d2fe;
}

.serial-summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label { font-weight: 700; color: #334155; font-size: 0.9rem; }

.summary-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: #4f46e5;
    font-family: var(--font-en);
}

.serial-summary-warning { margin-top: 0.5rem; font-size: 0.78rem; color: #d97706; font-weight: 600; }

/* Receipt Footer */
.receipt-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #d1d5db;
}

.receipt-footer p { color: #4b5563; margin-bottom: 0.5rem; font-weight: 500; }
.receipt-note-small { font-size: 0.8rem; color: #94a3b8; }

/* ============================================
   RECEIPT ACTIONS - Premium Download Buttons
   ============================================ */
.receipt-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.875rem;
}

.download-btn {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    color: white;
    font-family: var(--font-bn);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.4s ease;
}

.download-btn:hover::before { left: 100%; }
.download-btn svg { width: 20px; height: 20px; position: relative; z-index: 1; }
.download-btn span { position: relative; z-index: 1; }

.pdf-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.pdf-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4); }

.image-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.image-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4); }

.secondary-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--shadow-btn);
}

.secondary-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); }

/* ============================================
   SETTINGS MODAL - Glassmorphism
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.35s var(--ease-bounce);
    border: 1px solid var(--border);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { font-size: 1.2rem; color: var(--text-primary); font-weight: 700; }

.close-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-btn:hover { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); transform: rotate(90deg); }

.modal-body { padding: 1.5rem; overflow-y: auto; }

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    font-family: var(--font-bn);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4); }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-dim); }

/* ============================================
   TOAST NOTIFICATIONS - Premium
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s var(--ease-bounce);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-icon { width: 22px; height: 22px; flex-shrink: 0; }
.toast-icon.success { color: var(--success); }
.toast-icon.error { color: var(--danger); }
.toast-icon.warning { color: var(--warning); }

.toast-content { flex: 1; }
.toast-title { font-weight: 700; color: var(--text-primary); margin-bottom: 0.15rem; font-size: 0.9rem; }
.toast-message { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.toast-close:hover { color: var(--text-primary); background: var(--bg-input); }

/* ============================================
   SCROLLBAR - Styled
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .header h1 { font-size: 1.15rem; }
    .card-header { padding: 2rem 1.5rem; }
    .card-header h2 { font-size: 1.25rem; }
    .booking-type-selector { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .preview-content { grid-template-columns: 1fr; gap: 0.75rem; }
    .preview-divider { display: none; }
    .toast { min-width: auto; max-width: calc(100vw - 2rem); }
    .toast-container { left: 1rem; right: 1rem; }
    .receipt-actions { grid-template-columns: 1fr; }
    .receipt-stats { grid-template-columns: 1fr; }
    .stat-box { padding: 1rem; }
    .stat-number { font-size: 1.75rem; }
    .receipt-content { padding: 1.5rem; }
    .receipt-logo h1 { font-size: 1.5rem; }

    .serial-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .serial-item-right {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .serial-dup-note,
    .serial-fail-msg { text-align: left; width: 100%; }

    .result-date-row { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .main-content { padding: 1rem 0.75rem; }
    .booking-form { padding: 1.25rem; }
    .card-header { padding: 1.5rem 1.25rem; }
    .type-btn { padding: 0.75rem; font-size: 0.85rem; }
    .type-btn span { font-size: 0.82rem; }
    .modal-content { margin: 0; border-radius: var(--radius-lg); }
    .submit-btn { padding: 1rem; font-size: 1rem; }
    .download-btn { padding: 0.875rem 1rem; font-size: 0.9rem; }
}

/* Print Styles */
@media print {
    .header, .form-actions, .icon-btn, .toast-container { display: none; }
    .booking-card { box-shadow: none; }
    body::before { display: none; }
}
