/* ============================================
   TICKET PALACE - SUNSET YELLOW & ORANGE THEME
   Inspired by the Ticket Palace sun/palm logo
   ============================================ */

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

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray-50: #FAFAFA;
    --color-gray-100: #F5F5F5;
    --color-gray-200: #E5E5E5;
    --color-gray-300: #D4D4D4;
    --color-gray-400: #A3A3A3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;

    /* Brand palette - unchanged, only WHERE these get used is changing */
    --color-primary: #F28400;
    --color-primary-dark: #CC6E00;
    --color-primary-light: #FFA940;
    --color-secondary: #FFC300;
    --color-secondary-dark: #E6B000;
    --color-secondary-tint: #FFF3D1;
    --color-ink: #241400;

    /* Typography */
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shared spacing/shape/depth scale, so every page pulls from the same
       values instead of each hand-rolling its own shadow/radius numbers. */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --shadow-sm: 0 1px 3px rgba(23,23,23,0.08);
    --shadow-md: 0 8px 20px rgba(23,23,23,0.08);
    --shadow-lg: 0 16px 40px rgba(23,23,23,0.12);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-gray-900);
    background-color: var(--color-white);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Inline vector icons that replace emoji - sized to sit on the text
   baseline like the emoji they replaced. Add .icon-block for the larger
   standalone icons (empty states, benefit cards) instead. */
.icon-img {
    height: 1em;
    width: 1em;
    object-fit: contain;
    vertical-align: -0.15em;
    display: inline-block;
}

.icon-block {
    display: inline-block;
    object-fit: contain;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: transparent;
}

/* ============================================
   HOME PAGE: HEADER-ON-GRADIENT (index.php only)
   Header sits transparently on the hero gradient and
   scrolls away with the page - no background of its own.
   ============================================ */

.hero-gradient-wrap {
    position: relative;
    overflow: hidden;
    background-color: var(--color-ink);
    background-image: url('../images/backgroundgradient.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-gradient-wrap > * {
    position: relative;
    z-index: 1;
}

#main-header.header-transparent {
    background: transparent;
    border-bottom-color: transparent;
}

#main-header.header-transparent .logo h1 {
    color: var(--color-secondary);
}

#main-header.header-transparent nav ul li a {
    color: var(--color-gray-100);
}

#main-header.header-transparent nav ul li a:hover {
    color: var(--color-secondary);
}

#main-header.header-transparent nav ul li a::after {
    background: var(--color-secondary);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-img {
    display: block;
    height: 66px;
    width: 150px;
}

.slogan-img {
    display: block;
    height: 46px;
    width: auto;
    position: relative;
    top: 4px;
}

header .logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--color-primary);
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

header nav ul li a {
    color: var(--color-gray-700);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

header nav ul li a:hover {
    color: var(--color-primary);
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

header nav ul li a:hover::after {
    width: 100%;
}

header nav ul li a.active {
    color: var(--color-primary);
    font-weight: 700;
}

.btn-account {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-account:hover {
    background: var(--color-primary-dark);
}

.btn-account::after {
    display: none;
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem 4rem;
    text-align: center;
}

#hero h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-white);
    text-shadow: 0 2px 16px rgba(0,0,0,0.35);
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    color: var(--color-white);
    text-shadow: 0 1px 10px rgba(0,0,0,0.3);
    opacity: 0.92;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ============================================
   SEARCH BAR
   ============================================ */

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--color-white);
    border-radius: 50px;
    background: var(--color-white);
    transition: border-color 0.2s ease;
    outline: none;
    box-shadow: 0 4px 16px rgba(36,20,0,0.15);
}

.search-bar:focus {
    border-color: var(--color-primary);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-400);
    pointer-events: none;
}

/* ============================================
   FILTERS
   ============================================ */

.filters-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

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

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-black);
    letter-spacing: -0.5px;
}

/* ============================================
   EVENT CARDS GRID
   ============================================ */

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.event-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    border: 1px solid var(--color-gray-200);
}

.event-card:hover {
    border-color: var(--color-gray-300);
    box-shadow: var(--shadow-md);
}

.event-card:hover .event-image {
    transform: scale(1.03);
}

.event-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: var(--color-gray-100);
    transition: transform 0.4s ease;
}

.event-details {
    padding: 1.5rem;
}

.event-date {
    font-size: 0.85rem;
    color: var(--color-gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.event-venue {
    font-size: 0.95rem;
    color: var(--color-gray-600);
    margin-bottom: 1rem;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-200);
}

.event-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.delivery-badge {
    font-size: 0.75rem;
    color: var(--color-primary-dark);
    background: var(--color-secondary-tint);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

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

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Tertiary action - text-only, no fill or border. For actions that
   shouldn't compete visually with the primary/secondary buttons on the
   same screen (e.g. "Cancel" next to "Save"). */
.btn-ghost {
    background: transparent;
    color: var(--color-gray-600);
    border: none;
    padding: 0.8rem 1rem;
}

.btn-ghost:hover {
    color: var(--color-primary);
}

/* ============================================
   MODAL (for event details)
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-white);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--color-white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-close:hover {
    background: var(--color-secondary-tint);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--color-white);
    color: var(--color-gray-700);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-black);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--color-gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
    color: var(--color-gray-500);
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    header nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    #hero h2 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    main {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 52px;
        width: 118px;
    }

    .slogan-img {
        height: 36px;
    }

    #hero h2 {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
    }

    .search-bar {
        padding: 0.85rem 1.25rem;
    }

    .filters-container {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Shared by every sidebar-based admin/organiser dashboard (admin-dashboard,
   organiser-dashboard, attendees, staff) - each defines .admin-main/
   .stat-card/.admin-card locally with the same names, so one rule here
   tightens all of them on phones instead of repeating it per page. */
@media (max-width: 480px) {
    .admin-main {
        padding: 1rem;
    }

    .stat-card, .admin-card {
        padding: 1.25rem;
    }
}

/* Every admin/organiser list page builds its own `.table` in a page-local
   <style> block (name/email/role/status/... columns), none of which
   account for narrow screens on their own. Rather than duplicate a fix
   into each one, this single shared rule lets any of those tables scroll
   horizontally instead of overflowing/breaking the page layout - the
   standard CSS-only technique (no markup wrapper needed). */
@media (max-width: 768px) {
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   AUTH PAGES (shared)
   Login, register, forgot/reset password, 2FA, email verification -
   previously each page copy-pasted this whole block into its own <style>;
   consolidated here so a change in one place matches everywhere.
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-50);
    padding: 2rem;
}

.auth-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

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

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--color-gray-600);
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
    background: var(--color-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.password-field-wrapper {
    position: relative;
}

.password-field-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gray-500);
    padding: 0.4rem;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: var(--color-primary);
}

/* Hide native browser reveal/clear icons (e.g. Edge's built-in eye icon)
   so only our own toggle button shows - the native one is what
   disappears/reappears inconsistently on focus changes. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    color: var(--color-gray-700);
    cursor: pointer;
    font-size: 0.95rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit:hover {
    background: var(--color-primary-dark);
}

.divider {
    text-align: center;
    margin: 2rem 0;
    color: var(--color-gray-500);
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--color-gray-300);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--color-gray-600);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-error {
    background: #FEE;
    color: #C00;
    border: 1px solid #FCC;
}

.alert-success {
    background: #EFE;
    color: #070;
    border: 1px solid #CFC;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFB74D;
}

.back-home {
    text-align: center;
    margin-bottom: 2rem;
}

.back-home a {
    color: var(--color-gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-home a:hover {
    color: var(--color-primary);
}

@media (max-width: 480px) {
    .auth-box {
        padding: 2rem 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.6rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }