/* ============================================================
   EventKu — Mobile-First Clean White Design System
   ============================================================ */
:root {
    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --border-soft: #E2E8F0;
    --brand-primary: #0EA5E9;
    --brand-primary-dark: #0284C7;
    --brand-primary-soft: #E0F2FE;
    --brand-accent: #10B981;
    --brand-accent-soft: #ECFDF5;
    --radius-card: 18px;
    --radius-btn: 12px;
    --shadow-soft: 0 2px 14px rgba(15, 23, 42, 0.04);
    --shadow-float: 0 -4px 24px rgba(15, 23, 42, 0.08);
    --bottom-nav-height: 68px;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
}

/* Mobile-first container comfort */
.app-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* Sticky Top App Bar */
.navbar-clean {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    min-height: 60px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0EA5E9, #10B981);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Cards */
.card-clean {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-pressable:active {
    transform: scale(0.985);
}

/* Touch-Friendly Buttons */
.btn-brand {
    background-color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    color: #fff;
    border-radius: var(--radius-btn);
    font-weight: 600;
    min-height: 46px;
    padding: 0.65rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn-brand:hover, .btn-brand:focus {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: #fff;
}

.btn-brand.btn-sm {
    min-height: 38px;
    padding: 0.4rem 0.95rem;
    font-size: 0.875rem;
}

.btn-outline-clean {
    background: #fff;
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    border-radius: var(--radius-btn);
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-outline-clean:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: var(--text-primary);
}

.btn-outline-clean.btn-sm {
    min-height: 36px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
}

/* Prevent iOS zoom on inputs */
.form-control, .form-select {
    border-color: var(--border-soft);
    border-radius: 12px;
    padding: 0.7rem 0.95rem;
    font-size: 16px;
    min-height: 46px;
    background-color: #fff;
}

.form-control-sm, .form-select-sm {
    min-height: 40px;
    font-size: 15px;
    padding: 0.45rem 0.8rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

/* Horizontal Scrollable Pills (Mobile Native Feel) */
.chip-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chip-scroll::-webkit-scrollbar {
    display: none;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #FFFFFF;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Mobile Search Pill */
.search-pill {
    background: #FFFFFF;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 4px 6px 4px 12px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-pill input {
    border: 0;
    outline: none;
    width: 100%;
    font-size: 15px;
    background: transparent;
    color: var(--text-primary);
    min-height: 40px;
}

/* Event Media */
.event-banner-placeholder {
    background: linear-gradient(135deg, #E0F2FE 0%, #ECFDF5 100%);
    color: #0369A1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.event-card-media {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-top-left-radius: calc(var(--radius-card) - 1px);
    border-top-right-radius: calc(var(--radius-card) - 1px);
}

.event-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-date-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Quantity Stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #F8FAFC;
    overflow: hidden;
}

.qty-stepper button {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qty-stepper button:active {
    background: #E2E8F0;
}

.qty-stepper input {
    width: 38px;
    height: 38px;
    border: 0;
    background: #FFFFFF;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0;
    min-height: auto;
}

/* Payment Method Tile */
.payment-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1.5px solid var(--border-soft);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: #FFFFFF;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.payment-tile:has(input:checked) {
    border-color: var(--brand-primary);
    background-color: #F0F9FF;
}

/* Fixed Mobile Bottom Tab Bar */
.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: var(--shadow-float);
}

.mobile-nav-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 0;
    border-radius: 12px;
    transition: color 0.15s ease;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    line-height: 1.2;
}

.mobile-nav-item.active {
    color: var(--brand-primary-dark);
}

.mobile-nav-item.active i {
    color: var(--brand-primary);
}

.mobile-nav-badge {
    position: absolute;
    top: 0;
    right: calc(50% - 20px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Sticky Mobile Action Bar (above bottom nav) */
.mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    z-index: 1030;
    background: #FFFFFF;
    border-top: 1px solid var(--border-soft);
    padding: 12px 16px;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
}

.has-sticky-cta {
    padding-bottom: calc(var(--bottom-nav-height) + 92px + env(safe-area-inset-bottom, 0px));
}

/* Floating WhatsApp Button (Mobile-First Safe Positioning) */
.whatsapp-float-btn {
    position: fixed;
    right: 16px;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 14px);
    z-index: 1035;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #25D366;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float-btn:hover,
.whatsapp-float-btn:focus {
    background-color: #1EBE5D;
    color: #FFFFFF;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.45);
}

.has-sticky-cta .whatsapp-float-btn {
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 86px);
}

/* Wallet-Style Ticket Pass */
.ticket-pass {
    background: #FFFFFF;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.ticket-perforation {
    position: relative;
    border-top: 2px dashed #CBD5E1;
    margin: 1.15rem 0;
}

.ticket-perforation::before,
.ticket-perforation::after {
    content: '';
    position: absolute;
    top: -11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-page);
    border: 1px solid var(--border-soft);
}

.ticket-perforation::before { left: -26px; }
.ticket-perforation::after { right: -26px; }

/* Payment Instruction Box */
.payment-box {
    background: #F8FAFC;
    border: 1.5px dashed #94A3B8;
    border-radius: 16px;
    padding: 1.25rem;
}

/* KPI Card */
.kpi-card {
    background: #FFFFFF;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow-soft);
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* Admin Sidebar */
.admin-shell { min-height: 100vh; }

.admin-sidebar {
    width: 250px;
    background: #FFFFFF;
    border-right: 1px solid var(--border-soft);
    flex-shrink: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.15s ease;
}

.admin-nav-link:hover {
    background: #F1F5F9;
    color: var(--text-primary);
}

.admin-nav-link.active {
    background: var(--brand-primary-soft);
    color: var(--brand-primary-dark);
    font-weight: 600;
}

.table > :not(caption) > * > * {
    padding: 0.85rem 1rem;
    border-bottom-color: #F1F5F9;
}

/* Desktop Progressive Enhancement (>= 992px) */
@media (min-width: 992px) {
    body, .has-sticky-cta {
        padding-bottom: 0;
    }

    .mobile-bottom-nav,
    .mobile-sticky-cta {
        display: none !important;
    }

    .whatsapp-float-btn,
    .has-sticky-cta .whatsapp-float-btn {
        right: 24px;
        bottom: 24px;
        width: 58px;
        height: 58px;
        font-size: 1.75rem;
    }

    .card-hover:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    }

    .event-card-media {
        height: 200px;
    }
}

@media print {
    .no-print,
    .mobile-bottom-nav,
    .mobile-sticky-cta,
    .whatsapp-float-btn {
        display: none !important;
    }
    body {
        background: #FFFFFF !important;
        padding-bottom: 0 !important;
    }
    .ticket-pass {
        box-shadow: none !important;
        border: 1px solid #CBD5E1 !important;
    }
}
