@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #1D4E73; 
    --primary-hover: #143650;
    
    /* Ticket Status Colors (These were missing!) */
    --available-color: #2ECC71; /* Green */
    --reserved-color: #F1C40F;  /* Yellow */
    --sold-color: #E74C3C;      /* Red */
    
    --bg-light: #F4F7F6;
    --text-dark: #2C3E50;
    --white: #FFFFFF;
}

html {
    scroll-behavior: smooth; /* Enables smooth scrolling when clicking nav links */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background-color: var(--bg-light); color: var(--text-dark); line-height: 1.6; }

/* Navigation Bar */
header {
    background-color: var(--primary-color);
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: auto; padding: 15px 20px;
}

.logo { color: var(--white); font-size: 24px; font-weight: 700; text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--white); text-decoration: none; font-weight: 600; transition: 0.3s; }
.nav-links a:hover { color: #A8C6FA; }

.lang-select {
    padding: 5px; border-radius: 5px; border: none; background: var(--white); color: var(--primary-color); font-weight: bold; cursor: pointer;
}

.btn-login {
    background-color: var(--white); color: var(--primary-color);
    padding: 8px 20px; border-radius: 20px; text-decoration: none; font-weight: 700; border: none; cursor: pointer; transition: 0.3s;
}
.btn-login:hover { background-color: #E2E8F0; }

/* Sections */
section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 80px 20px 20px; text-align: center; }

#home { background: linear-gradient(135deg, #1D4E73 0%, #2980B9 100%); color: var(--white); }
#home h1 { font-size: 3rem; margin-bottom: 20px; }
#home p { font-size: 1.2rem; max-width: 600px; margin-bottom: 30px; }
#home .btn-primary { background: var(--white); color: var(--primary-color); padding: 15px 30px; border-radius: 30px; font-size: 18px; }

#about, #services { background: var(--bg-light); color: var(--primary-color); }
#about h2, #services h2 { font-size: 2.5rem; margin-bottom: 20px; }
.service-cards { display: flex; gap: 20px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }
.card { background: var(--white); padding: 30px; border-radius: 10px; box-shadow: 0 4px 15px rgba(29, 78, 115, 0.1); width: 300px; }

/* Glassmorphism Auth Modal */
.modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); justify-content: center; align-items: center;
}
.modal.active { display: flex; }

.auth-container {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 15px; padding: 40px; box-shadow: 0 8px 32px rgba(29, 78, 115, 0.3); width: 100%; max-width: 400px; position: relative;
}

.close-btn { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; color: var(--text-dark); }
.auth-header { text-align: center; margin-bottom: 25px; color: var(--primary-color); }
.form-group { margin-bottom: 15px; text-align: left; }
.form-control { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; }
.form-control:focus { outline: none; border-color: var(--primary-color); }
.btn-submit { width: 100%; padding: 12px; background: var(--primary-color); color: var(--white); border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
.toggle-form { margin-top: 15px; text-align: center; font-size: 14px; }
.toggle-form a { color: var(--primary-color); font-weight: bold; cursor: pointer; text-decoration: underline; }
.hidden { display: none; }
/* =========================================
   DASHBOARD LAYOUT (Admin & User)
   ========================================= */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: #E2E8F0; /* Slightly darker gray for contrast against white cards */
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--primary-color); /* Deep Blue */
    color: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.sidebar-profile {
    text-align: center;
    padding: 30px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--white);
    margin-bottom: 10px;
    object-fit: cover;
}

.sidebar-profile h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-profile p {
    font-size: 12px;
    color: #A8C6FA;
}

/* Navigation Links */
.sidebar-nav {
    flex-grow: 1; /* Pushes the logout button to the bottom */
    list-style: none;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s;
}

.sidebar-nav a i {
    width: 25px;
    font-size: 18px;
    margin-right: 15px;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left: 4px solid var(--white);
}

/* Logout Button Pinned to Bottom */
.sidebar-logout {
    margin-top: auto;
    padding: 15px 25px;
    background-color: rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.sidebar-logout a {
    display: flex;
    align-items: center;
    color: #E74C3C; /* Red color for logout */
    text-decoration: none;
    font-weight: 600;
}

.sidebar-logout a i {
    margin-right: 15px;
    font-size: 18px;
}

.sidebar-logout:hover {
    background-color: #E74C3C;
}

.sidebar-logout:hover a {
    color: var(--white);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.top-header h2 {
    color: var(--text-dark);
    font-weight: 600;
}

.header-icons i {
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
}

/* Stats Cards (Top Row) */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card.dark {
    background: var(--primary-color);
    color: var(--white);
}

.stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.stat-card.dark .stat-header {
    color: #A8C6FA;
}

.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
}

/* Charts Grid (Middle and Bottom Rows) */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}
/* =========================================
   FORMS & TABLES (Admin Dashboard)
   ========================================= */
.card-form {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-grid .full-width {
    grid-column: span 2;
}

.data-table-wrapper {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #E2E8F0;
}

.data-table th {
    background-color: #F8FAFC;
    color: var(--text-dark);
    font-weight: 600;
}

.data-table tr:hover {
    background-color: #F1F5F9;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-upcoming { background: #E1EFFE; color: #1E429F; }
.badge-active { background: #DEF7EC; color: #03543F; }
.badge-completed { background: #F3F4F6; color: #4B5563; }
/* =========================================
   USER UI & TICKET GRID
   ========================================= */
.ticket-legend {
    display: flex; gap: 20px; margin-bottom: 20px; font-weight: 600; font-size: 14px;
}
.legend-item span {
    display: inline-block; width: 15px; height: 15px; border-radius: 4px; margin-right: 8px; vertical-align: middle;
}
.legend-available span { background-color: var(--available-color); }
.legend-reserved span { background-color: var(--reserved-color); }
.legend-sold span { background-color: var(--sold-color); }

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.ticket {
    padding: 15px 5px; text-align: center; border-radius: 8px; font-weight: 700; font-size: 16px;
    color: var(--white); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.ticket.available { background-color: var(--available-color); }
.ticket.available:hover { transform: scale(1.1); box-shadow: 0 6px 10px rgba(0,0,0,0.2); }
.ticket.reserved { background-color: var(--reserved-color); cursor: not-allowed; color: var(--text-dark); }
.ticket.sold { background-color: var(--sold-color); cursor: not-allowed; }

.lottery-card {
    background: var(--white); padding: 25px; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); margin-bottom: 20px;
    display: flex; justify-content: space-between; align-items: center;
}