/* Festival Booking System - Main Stylesheet (Dark Theme) */

/* --- 1. BASE STYLES --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #e0e0e0; /* Off-white text for readability */
    background-color: #18181b; /* Sleek dark charcoal background */
}

.container {
    width: 90%;
    margin: 0 auto;
    padding: 2px;
}

.content {
    min-height: 500px;
    padding: 20px 0;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
}

label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
    color: #cccccc;
}

/* --- 2. FORMS & INPUTS --- */
.form-group { margin-bottom: 15px; }

input[type="text"], 
input[type="password"], 
select, 
textarea { 
    width: 100%; 
    padding: 8px; 
    box-sizing: border-box; 
    background-color: #27272a; /* Dark input boxes */
    color: #ffffff; 
    border: 1px solid #3f3f46; 
    border-radius: 4px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #6ec6ff;
}

/* --- 3. TABLES --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #3f3f46; /* Dark borders */
}

th {
    background-color: #27272a; /* Dark header row */
    color: #ffffff;
}

tr:hover {
    background-color: #3f3f46; /* Lighter highlight on hover */
}

/* --- 4. BUTTONS --- */
.btn-primary { 
    padding: 10px 20px; 
    background: #007bff; 
    color: white; 
    border: none; 
    border-radius: 4px;
    cursor: pointer; 
}
.btn-primary:hover { background: #0056b3; }

.btn-download {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.btn-download:hover {
    background-color: #218838;
    color: #ffffff;
    text-decoration: none;
}
.btn-download span { margin-right: 8px; }

/* --- 5. ALERTS & MESSAGES --- */
.messages, .alert { 
    padding: 10px; 
    margin-bottom: 15px; 
    border-radius: 4px; 
}
.success, .alert-success { background-color: rgba(40, 167, 69, 0.2); color: #81c784; border: 1px solid #28a745; }
.error, .alert-danger { background-color: rgba(220, 53, 69, 0.2); color: #e57373; border: 1px solid #dc3545; }
.info, .alert-info { background-color: rgba(23, 162, 184, 0.2); color: #4fc3f7; border: 1px solid #17a2b8; }
.alert-secondary { background-color: #27272a; color: #a1a1aa; border: 1px dashed #3f3f46; }

/* --- 6. UI CARDS (For users.epl & editShow.epl) --- */
.card {
    background-color: #27272a !important; /* Dark card background */
    border: 1px solid #3f3f46 !important;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #e0e0e0;
}
.card-header {
    background-color: #1e1e24 !important;
    border-bottom: 1px solid #3f3f46 !important;
    padding: 10px 15px;
    border-radius: 6px 6px 0 0;
}
.card-body { padding: 15px; }

/* Utility Overrides for Dark Mode */
.bg-light, .bg-white { background-color: #27272a !important; }
.bg-dark, .bg-primary { background-color: #1e1e24 !important; }
.text-dark { color: #e0e0e0 !important; }
.text-muted { color: #a1a1aa !important; }
.text-info { color: #6ec6ff !important; }
.shadow-sm { box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important; }

/* List Groups */
.list-group { display: flex; flex-direction: column; border-radius: 6px; border: 1px solid #3f3f46; }
.list-group-item {
    background-color: #27272a;
    border-bottom: 1px solid #3f3f46;
    padding: 10px 15px;
    color: #e0e0e0;
}
.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background-color: #3f3f46; }
.list-group-item.active { background-color: #007bff; color: #fff; border-color: #007bff; }

/* --- 7. LAYOUT & RESPONSIVE --- */
.row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Helps with columns */
}
.col-md-4 { width: 32%; }
.col-md-8 { width: 65%; }
.col-md-6 { width: 48%; }

@media (max-width: 768px) {
    .row { flex-direction: column; }
    .row > div, .col-md-4, .col-md-8, .col-md-6 { width: 100%; margin-right: 0 !important; margin-bottom: 20px; }
    .container { width: 95%; }
}

/* --- 8. LOGIN PAGE --- */
.login-body {
    background-color: #18181b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}
.login-logo {
    width: 300px;
    margin-bottom: 30px; /* Space between logo and login box */
    border-radius: 8px;
    /* UNCOMMENT THE LINE BELOW IF YOUR LOGO IS BLACK AND NEEDS TO BE WHITE */
    /* filter: invert( 1) brightness(2); */
}
.login-box {
    background: #27272a;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    width: 300px;
    text-align: center;
    border: 1px solid #3f3f46;
}
.login-box h2 { margin-top: 0; color: #ffffff; }
.login-box input {
    background-color: #18181b;
    color: #ffffff;
    border: 1px solid #3f3f46;
}
.login-box button {
    width: 100%; padding: 10px; background: #007bff; color: white;
    border: none; border-radius: 4px; font-size: 16px; cursor: pointer;
}
.login-box button:hover { background: #0056b3; }
.login-error { color: #e57373; font-weight: bold; margin-bottom: 15px; }

/* --- 9. TOP NAV BAR --- */
.auth-bar {
    width: 100%;
    background: #09090b; /* Very dark/almost black for contrast */
    color: #ffffff;
    border-bottom: 1px solid #27272a;
    padding: 0 15px;
    box-sizing: border-box;
}
.auth-bar .container {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
}
.header-left, .header-right { flex: 0 0 auto; }
.header-center { flex: 1 1 auto; text-align: center; }

.app-title { margin: 0; font-size: 1.4rem; font-weight: bold; color: #ffffff; line-height: 1; }
.app-title small { font-weight: normal; color: #a1a1aa; font-size: 0.7em; margin-left: 5px; }

.auth-bar a { color: #6ec6ff; text-decoration: none; margin-left: 10px; }
.auth-bar a:hover { color: #ffffff; text-decoration: underline; }

/* Floating Nav Pill */
.header-nav-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-block;
}
.header-nav-pill ul { margin: 0; padding: 0; display: flex; align-items: center; list-style: none; }
.header-nav-pill li { margin: 0 2px; }
.header-nav-pill a {
    display: block; padding: 6px 12px; border-radius: 20px;
    color: #a1a1aa; text-decoration: none; transition: all 0.2s ease;
}
.header-nav-pill a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.header-nav-pill a.active { color: #ffffff; font-weight: bold; background: rgba(255, 255, 255, 0.15); }

/* --- 10. FOOTER --- */
footer {
    margin-top: 30px;
    padding: 20px 0;
    text-align: center;
    background-color: #09090b;
    border-top: 1px solid #27272a;
    color: #a1a1aa;
}

/* Base styles for all status badges */
.status-badge {
    display: inline-block;
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.9em;
    text-align: center;
}

/* Specific styles for completed orders */
.status-ordered {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Specific styles for pending orders */
.status-pending {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    font-style: italic;
}

/* Keeps the background normal, but adds a thick left border */
.row-ordered td:first-child {
    border-left: 5px solid #c3e6cb !important; /* Thick gray line on the left edge */
}

/* --- DROPDOWN NAVIGATION --- */
.header-nav-pill li.nav-dropdown {
    position: relative;
}

.header-nav-pill li.nav-dropdown > a.dropdown-toggle {
    cursor: default; /* So it doesn't look like a clickable link */
}

/* The hidden menu box */
.header-nav-pill .dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%); /* Centers the dropdown exactly under the button */
    background: #27272a; /* Matches your dark card background */
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    border-radius: 6px;
    border: 1px solid #3f3f46;
    padding: 8px 0;
    z-index: 1000;
    flex-direction: column;
    align-items: flex-start;
}

/* THE HOVER MAGIC: Show the menu when hovering over the parent <li> */
.header-nav-pill li.nav-dropdown:hover .dropdown-menu {
    display: flex; 
}

/* Style the links inside the dropdown */
.header-nav-pill .dropdown-menu li {
    width: 100%;
    margin: 0; 
}

.header-nav-pill .dropdown-menu a {
    padding: 8px 16px;
    border-radius: 0; /* Override the "pill" style for a standard list look */
    color: #e0e0e0;
    display: block;
    text-align: left;
}

.header-nav-pill .dropdown-menu a:hover,
.header-nav-pill .dropdown-menu a.active {
    background-color: #3f3f46;
    color: #ffffff;
    font-weight: bold;
}