:root {
    --primary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --dark: #2c3e50;
}

body { font-family: 'Segoe UI', Arial, sans-serif; margin: 0; background: #f4f7f6; }
h2 { font-size: 18px; color: #FFF; }

/* Main Container Centering */
.container { 
    max-width: 1100px; 
    margin: 30px auto; 
    background: white; 
    padding: 30px; 
    border-radius: 12px; 
    min-height: 600px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Nav Bar Fix */
.main-nav { background: var(--dark); height: 70px; width: 100%; }
.nav-container { 
    max-width: 1100px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 100%; 
    padding: 0 20px; 
}

.nav-logo a { color: white; font-weight: bold; text-decoration: none; font-size: 1.4rem; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a, .dropbtn { color: white; text-decoration: none; font-size: 0.95rem; background: none; border: none; cursor: pointer; }

/* Admin Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    right: 0;
    border-radius: 4px;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a {
    color: #333 !important;
    padding: 12px 16px;
    display: block;
    border-bottom: 1px solid #eee;
}
.dropdown-content a:hover { background: #f8f9fa; color: var(--primary) !important; }

/* Helpers */
.active-nav { color: var(--primary) !important; font-weight: bold; }
.btn-logout { background: var(--danger); padding: 8px 15px !important; border-radius: 4px; color: white !important; }

/* --- BACK TO BASICS SEATING --- */
.seating-wrapper {
    text-align: center; /* This centers the inline-block seats */
    width: 100%;
    clear: both;
}

.seat {
    display: inline-block !important; /* Forces them to stay side-by-side */
    width: 40px;
    height: 40px;
    margin: 3px;
    line-height: 40px; /* Centers text vertically */
    text-align: center;
    border: 2px solid #3498db;
    background: #fff;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    vertical-align: top;
    border-radius: 4px;
}

.aisle-gap {
    display: inline-block !important;
    width: 30px; /* The horizontal gap */
    height: 40px;
}

.row-break {
    display: block !important; /* Acts like a <br> tag */
    width: 100%;
    height: 10px;
}

/* Colors */
.seat.selected { background: #27ae60 !important; color: white; }
.seat.reserveret { background: #3498db !important; color: #FFF; border-color: #ccc; cursor: not-allowed; }
.seat.betalt { background: #e74c3c !important; color: white; border-color: #ccc; cursor: not-allowed; }

.status-ledig { background: #FFF !important; color: white; } /* White */
.status-reserveret { background: #3498db !important; color: #FFF; border-color: #ccc; cursor: not-allowed; }
.status-betalt { background: #e74c3c !important; color: white; border-color: #ccc; cursor: not-allowed; }



/* --- Event Info Header --- */
.event-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.event-header h1 { color: #2c3e50; margin-bottom: 5px; }
.event-header p { color: #7f8c8d; font-size: 1.1rem; }

/* --- Seat Legend --- */
.seating-legend {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-box { width: 20px; height: 20px; border-radius: 3px; border: 1px solid #ccc; }

/* --- Confirm Button --- */
.booking-actions {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

#confirmBtn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#confirmBtn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#confirmBtn:not(:disabled):hover {
    background: #219150;
}

/* --- Enhanced Event Details --- */
.event-details-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 30px;
}

.event-info-main {
    flex: 2;
    text-align: left;
}

.event-meta-sidebar {
    flex: 1;
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: left;
}

.event-description {
    margin-top: 15px;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #3498db;
}

.event-date-badge {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* --- Profile & Reservations --- */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.user-info-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    text-align: center;
}

.reservation-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.res-header {
    background: #2c3e50;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-body {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-seats {
    font-size: 1.2rem;
    color: #3498db;
    font-weight: bold;
    letter-spacing: 1px;
}

.res-status-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    text-transform: uppercase;
}

.reservation-card {
    border: 1px solid #eee;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}
.res-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.res-body {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* --- Fancy Individual Tickets --- */
.ticket-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fancy-ticket {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    border-left: 5px solid #3498db; /* Blue accent for reserved */
    transition: transform 0.2s;
}

.fancy-ticket.paid-border {
    border-left-color: #27ae60; /* Green accent for paid */
}

.ticket-left {
    padding: 20px;
    flex-grow: 1;
}

.ticket-right {
    width: 120px;
    background: #fcfcfc;
    border-left: 2px dashed #eee; /* The "Tear-off" look */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.ticket-event-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.ticket-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: flex;
    gap: 15px;
}

.seat-number-big {
    font-size: 1.5rem;
    font-weight: 800;
    color: #3498db;
    margin-bottom: 10px;
}

.btn-cancel-mini {
    background: #ff7675;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancel-mini:hover { background: #d63031; }

/* Sidebar Navigation Buttons */
.btn-nav {
    display: block;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
}

/* Specific Colors for different states */
.btn-nav.active {
    background: #3498db;
    color: white;
}

.btn-nav.secondary {
    background: #f8f9fa;
    color: #333;
}

.btn-nav.secondary:hover {
    background: #f0f2f5;
}

/* The Red Logout Button */
.btn-nav.danger {
    background: #ff7675;
    color: white;
    margin-top: 10px;
}

.btn-nav.danger:hover {
    background: #e74c3c;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.admin-header {
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.tab-link {
    text-decoration: none;
    padding: 10px 20px;
    background: #f4f7f6;
    color: #666;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
}

.tab-link.active {
    background: var(--dark);
    color: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.admin-table th, .admin-table td {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #fcfcfc;
    color: #888;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.admin-table td {
    vertical-align: middle; /* Keeps text and buttons aligned in the center of the row */
}

/* Ensure the progress bar for event sales looks clean */
progress {
    width: 100px;
    height: 12px;
    border-radius: 10px;
}
progress::-webkit-progress-bar { background-color: #eee; border-radius: 10px; }
progress::-webkit-progress-value { background-color: #27ae60; border-radius: 10px; }

.nav-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74c3c; /* Red color */
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 14px;
    text-align: center;
    border: 2px solid #fff; /* White border to make it pop */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure the tab link has enough space for the badge */
.tab-link {
    position: relative;
    margin-right: 15px; /* Add extra room so badges don't overlap next tab */
}
.btn-nav.active { background: #3498db; color: white; }
.btn-nav.danger { background: #ff7675; color: white; }
.btn-nav.success { background: #2ecc71; color: white; }

.row-archived {
    background-color: #f8f9fa;
    opacity: 0.7;
    border-left: 4px solid #95a5a6; /* Grey indicator */
}

.row-active {
    border-left: 4px solid #2ecc71; /* Green indicator */
}