/* =========================================
   EventTicketing Design System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --secondary: #0F172A;
    --accent: #F59E0B;
    --accent-hover: #D97706;
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --bg: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary);
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

/* Navbar */
.navbar-main {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}
.navbar-main .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.navbar-main .navbar-brand span { color: var(--secondary); }
.navbar-main .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.938rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
}
.navbar-main .nav-link:hover, .navbar-main .nav-link.active { color: var(--primary); background: var(--primary-light); }
.navbar-main .btn-cart { position: relative; color: var(--text-secondary); font-size: 1.25rem; padding: 0.5rem; }
.navbar-main .btn-cart .badge { position: absolute; top: 0; right: -4px; font-size: 0.65rem; padding: 0.2em 0.45em; background: var(--primary); }

/* Buttons */
.btn { font-weight: 600; border-radius: var(--radius); padding: 0.625rem 1.25rem; font-size: 0.938rem; transition: var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.35); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1.063rem; border-radius: var(--radius-lg); }

/* Cards */
.card { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: var(--transition); overflow: hidden; }
.event-card { background: var(--bg-white); height: 100%; }
.event-card:hover { box-shadow: var(--shadow-lg); }
.event-card .card-img-wrap { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.event-card .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.event-card:hover .card-img-wrap img { transform: scale(1.05); }
.event-card .card-img-wrap .date-badge { position: absolute; top: 12px; left: 12px; background: var(--bg-white); border-radius: var(--radius); padding: 4px 10px; text-align: center; box-shadow: var(--shadow-md); min-width: 52px; }
.event-card .date-badge .month { font-size: 0.7rem; font-weight: 700; color: var(--primary); text-transform: uppercase; line-height: 1; }
.event-card .date-badge .day { font-size: 1.25rem; font-weight: 800; color: var(--secondary); line-height: 1.2; font-family: var(--font-heading); }
.event-card .card-img-wrap .badge-overlay { position: absolute; top: 12px; right: 12px; }
.event-card .card-body { padding: 1.25rem; display: flex; flex-direction: column; }
.event-card .event-category { font-size: 0.75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.35rem; }
.event-card .event-title { font-family: var(--font-heading); font-size: 1.063rem; font-weight: 700; color: var(--secondary); margin-bottom: 0.5rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card .event-title a { color: inherit; }
.event-card .event-title a:hover { color: var(--primary); }
.event-card .event-meta { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.35rem; }
.event-card .event-meta i { width: 18px; color: var(--text-muted); }
.event-card .card-footer { padding: 1rem 1.25rem; background: var(--bg); border-top: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; }
.event-card .event-price { font-family: var(--font-heading); font-weight: 700; color: var(--secondary); font-size: 1.063rem; }
.event-card .event-price .from { font-size: 0.75rem; font-weight: 400; color: var(--text-secondary); }

/* Badges */
.badge-selling-fast { background: var(--warning); color: #fff; font-size: 0.7rem; padding: 0.3em 0.65em; border-radius: var(--radius-sm); font-weight: 600; }
.badge-sold-out { background: var(--danger); color: #fff; font-size: 0.7rem; padding: 0.3em 0.65em; border-radius: var(--radius-sm); font-weight: 600; }
.badge-featured { background: var(--accent); color: #fff; font-size: 0.7rem; padding: 0.3em 0.65em; border-radius: var(--radius-sm); font-weight: 600; }
.badge-free { background: var(--success); color: #fff; font-size: 0.7rem; padding: 0.3em 0.65em; border-radius: var(--radius-sm); font-weight: 600; }
.badge-status { padding: 0.35em 0.75em; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; }

/* Hero */
.hero-section { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338CA 100%); padding: 5rem 0 6rem; position: relative; overflow: hidden; }
.hero-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-section * { position: relative; z-index: 1; }
.hero-section h1 { font-family: var(--font-heading); font-weight: 800; font-size: 3rem; color: #fff; margin-bottom: 1rem; }
.hero-section p.lead { color: rgba(255,255,255,0.8); font-size: 1.188rem; margin-bottom: 2rem; }
.hero-search { background: var(--bg-white); border-radius: var(--radius-xl); padding: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); max-width: 680px; display: flex; }
.hero-search input { border: none; padding: 1rem 1.25rem; font-size: 1rem; flex: 1; background: transparent; outline: none; border-radius: var(--radius-lg); }
.hero-search .btn { border-radius: var(--radius-lg); padding: 0.875rem 2rem; white-space: nowrap; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-header { margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-secondary); font-size: 1.063rem; }

/* Categories */
.category-card { text-align: center; padding: 1.75rem 1rem; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: var(--transition); cursor: pointer; text-decoration: none; display: block; }
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); color: inherit; }
.category-card .icon { width: 56px; height: 56px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.75rem; font-size: 1.5rem; color: var(--primary); transition: var(--transition); }
.category-card:hover .icon { background: var(--primary); color: #fff; }
.category-card .name { font-weight: 600; color: var(--secondary); font-size: 0.938rem; }
.category-card .count { font-size: 0.8rem; color: var(--text-muted); }

/* Stats */
.stats-section { background: var(--secondary); padding: 3.5rem 0; }
.stat-item { text-align: center; color: #fff; }
.stat-item .number { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--accent); }
.stat-item .label { font-size: 0.938rem; color: rgba(255,255,255,0.7); margin-top: 0.25rem; }

/* Newsletter */
.newsletter-section { background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%); padding: 4rem 0; text-align: center; }
.newsletter-section h2 { color: #fff; font-size: 1.75rem; margin-bottom: 0.5rem; }
.newsletter-section p { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; }
.newsletter-form { max-width: 500px; margin: 0 auto; display: flex; gap: 0.5rem; }
.newsletter-form input { flex: 1; padding: 0.75rem 1.25rem; border: 2px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.15); border-radius: var(--radius-lg); color: #fff; font-size: 1rem; }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,0.2); }
.newsletter-form .btn { background: #fff; color: var(--primary); font-weight: 700; border: none; padding: 0.75rem 1.75rem; border-radius: var(--radius-lg); }

/* Footer */
.footer { background: var(--secondary); color: rgba(255,255,255,0.7); padding: 4rem 0 2rem; }
.footer h5 { color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1rem; margin-bottom: 1.25rem; }
.footer a { color: rgba(255,255,255,0.6); font-size: 0.938rem; transition: var(--transition); }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 0.5rem; }
.footer .footer-brand { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: #fff; margin-bottom: 0.75rem; }
.footer .footer-brand span { color: var(--primary); }
.footer .footer-description { font-size: 0.938rem; color: rgba(255,255,255,0.5); line-height: 1.7; }
.footer .social-links a { font-size: 1.25rem; margin-right: 1rem; color: rgba(255,255,255,0.5); }
.footer .social-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; margin-top: 3rem; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.4); }

/* Auth Pages */
.auth-page { min-height: 80vh; display: flex; align-items: center; background: var(--bg); padding: 3rem 0; }
.auth-card { background: var(--bg-white); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 2.5rem; max-width: 460px; margin: 0 auto; width: 100%; }
.auth-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 0.5rem; }
.auth-card .subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; font-size: 0.938rem; }

/* Forms */
.form-label { font-weight: 500; font-size: 0.875rem; color: var(--text-primary); margin-bottom: 0.375rem; }
.form-control { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 0.7rem 1rem; font-size: 0.938rem; transition: var(--transition); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.input-group-text { background: var(--bg); border: 1.5px solid var(--border); color: var(--text-muted); }
.form-select { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 0.7rem 1rem; font-size: 0.938rem; }
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

/* Event Detail */
.event-hero { position: relative; height: 420px; overflow: hidden; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.event-hero img { width: 100%; height: 100%; object-fit: cover; }
.event-hero .overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 3rem 2rem 2rem; background: linear-gradient(transparent, rgba(0,0,0,0.75)); color: #fff; }

/* Ticket Selection */
.ticket-type-card { border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 0.75rem; transition: var(--transition); background: var(--bg-white); }
.ticket-type-card:hover { border-color: var(--primary); }
.ticket-type-card.selected { border-color: var(--primary); background: var(--primary-light); }
.ticket-type-card .ticket-name { font-weight: 600; font-size: 1rem; }
.ticket-type-card .ticket-price { font-family: var(--font-heading); font-weight: 700; font-size: 1.125rem; color: var(--primary); }
.ticket-type-card .ticket-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }
.ticket-type-card .original-price { text-decoration: line-through; color: var(--text-muted); font-size: 0.85rem; margin-right: 0.5rem; }
.ticket-type-card .ticket-remaining { font-size: 0.8rem; color: var(--warning); font-weight: 500; }
.ticket-type-card .ticket-sold-out { font-size: 0.8rem; color: var(--danger); font-weight: 600; }

/* Sticky sidebar */
.sticky-sidebar { position: sticky; top: 100px; }

/* Page Header */
.page-header { padding: 2rem 0 1.5rem; background: var(--bg-white); border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.breadcrumb { background: none; padding: 0; font-size: 0.875rem; margin-bottom: 0.5rem; }
.breadcrumb-item a { color: var(--text-secondary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* Filter sidebar */
.filter-section { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.filter-section h6 { font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 0.75rem; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; display: block; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); }

/* Organizer & Admin sidebar */
.sidebar { width: 260px; min-height: 100vh; background: var(--secondary); padding: 1.5rem 0; position: fixed; left: 0; top: 0; z-index: 1020; transition: var(--transition); }
.sidebar .sidebar-brand { padding: 0 1.5rem 1.5rem; font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1rem; }
.sidebar .sidebar-brand span { color: var(--primary); }
.sidebar .nav-item .nav-link { color: rgba(255,255,255,0.6); padding: 0.625rem 1.5rem; font-size: 0.938rem; font-weight: 500; transition: var(--transition); display: flex; align-items: center; gap: 0.75rem; }
.sidebar .nav-item .nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sidebar .nav-item .nav-link.active { color: #fff; background: var(--primary); border-radius: 0; }
.sidebar .nav-item .nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-content { margin-left: 260px; padding: 2rem; min-height: 100vh; }

/* Dashboard stat cards */
.stat-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-card .stat-value { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800; color: var(--secondary); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-secondary); }

/* Data tables */
.table-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table-card .table { margin-bottom: 0; }
.table-card .table th { background: var(--bg); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); border-bottom: 1px solid var(--border); padding: 0.875rem 1rem; }
.table-card .table td { padding: 0.875rem 1rem; vertical-align: middle; font-size: 0.938rem; border-bottom: 1px solid var(--border-light); }

/* Pagination */
.pagination .page-link { border-radius: var(--radius); margin: 0 2px; border: 1px solid var(--border); color: var(--text-secondary); font-weight: 500; font-size: 0.875rem; padding: 0.5rem 0.85rem; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* Toast */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 1055; }

/* Cart */
.cart-item { display: flex; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--border-light); align-items: center; }
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 80px; height: 60px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.qty-control { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-control button { width: 36px; height: 36px; border: none; background: var(--bg); color: var(--text-secondary); font-weight: 700; cursor: pointer; transition: var(--transition); }
.qty-control button:hover { background: var(--primary-light); color: var(--primary); }
.qty-control .qty-value { width: 40px; text-align: center; font-weight: 600; font-size: 0.938rem; border: none; outline: none; background: var(--bg-white); }

/* Checkout */
.checkout-steps { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2.5rem; }
.checkout-step { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-weight: 500; }
.checkout-step.active { color: var(--primary); }
.checkout-step.completed { color: var(--success); }
.checkout-step .step-number { width: 32px; height: 32px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.checkout-step.active .step-number { background: var(--primary); color: #fff; border-color: var(--primary); }
.checkout-step.completed .step-number { background: var(--success); color: #fff; border-color: var(--success); }

/* Review stars */
.stars { color: var(--accent); }
.stars-empty { color: var(--border); }

/* Responsive */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-content { margin-left: 0; }
}
@media (max-width: 768px) {
    .hero-section { padding: 3rem 0 4rem; }
    .hero-section h1 { font-size: 2rem; }
    .hero-search { flex-direction: column; }
    .hero-search .btn { width: 100%; }
    .section { padding: 3rem 0; }
    .newsletter-form { flex-direction: column; }
    .stat-item .number { font-size: 1.75rem; }
    .footer { padding: 2.5rem 0 1.5rem; }
    .event-hero { height: 280px; }
}
