:root {
    --primary-color: #e65c00;
    --secondary-color: #F9D423;
    --bg-color: #fffaf5;
    --text-color: #333;
    --seat-available: #4CAF50;
    --seat-selected: #2196F3;
    --seat-booked: #f44336;
    --seat-blocked: #9e9e9e;
    --pos-color: #8e44ad;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav a {
    margin-right: 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 3rem 1rem;
}

.event-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
    font-weight: bold;
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.stage {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px;
    margin: 20px auto;
    width: 80%;
    border-radius: 5px;
    letter-spacing: 2px;
}

.seating-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
    overflow-x: auto;
}

.seat-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.seat {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    color: white;
    font-size: 0.8rem;
    user-select: none;
}

.seat.available { background-color: var(--seat-available); }
.seat.selected { background-color: var(--seat-selected); }
.seat.booked { background-color: var(--seat-booked); cursor: not-allowed; }
.seat.blocked { background-color: var(--seat-blocked); cursor: not-allowed; }

.legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.seat-sample {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 3px;
}
.seat-sample.available { background: var(--seat-available); }
.seat-sample.selected { background: var(--seat-selected); }
.seat-sample.booked { background: var(--seat-booked); }
.seat-sample.blocked { background: var(--seat-blocked); }

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 15px 0;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-pos {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-secondary { background-color: #ddd; color: #333; }
.btn-danger { background-color: #d32f2f; color: white; }
.btn-pos { background-color: var(--pos-color); color: white; }

.pos-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f4ecf7;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

form label {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    font-weight: bold;
}

input, textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px;
    font-family: inherit;
}

.hidden { display: none !important; }

.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th { background: #eee; }

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

.manual-scan {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.scan-status {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
}

.scan-status.valid {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.scan-status.invalid {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.seat-edit-box {
    display: inline-flex;
    align-items: center;
    background: #eee;
    padding: 3px 6px;
    border-radius: 5px;
    margin: 2px;
}

.btn-delete-seat {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 0.7rem;
    margin-left: 5px;
}
