/* ============================================
   LAN-Party Turniersystem - Events & Admin CSS
   Dark Gaming Theme
   ============================================ */

/* --- Event Cards Grid --- */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.event-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

.event-card:hover {
    border-color: #00ffaa;
    transform: translateY(-2px);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid #2a2a3e;
}

.event-card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #e0e0e0;
}

.event-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00ffaa;
}

.event-price-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ffaa;
}

.event-card-body {
    padding: 1rem 1.25rem;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.meta-item {
    display: flex;
    gap: 0.75rem;
}

.meta-label {
    color: #888;
    min-width: 60px;
    font-size: 0.85rem;
}

.meta-value {
    color: #ccc;
    font-size: 0.9rem;
}

.event-description {
    color: #999;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.event-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-top: 1px solid #2a2a3e;
}

/* --- Event Detail --- */
.event-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.event-info-card,
.sidebar-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 1.5rem;
}

.event-info-card h3,
.sidebar-card h3 {
    margin-top: 0;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.event-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-description-full {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #2a2a3e;
}

.event-description-full h4 {
    color: #ccc;
    margin-bottom: 0.5rem;
}

/* --- Seats Bar --- */
.seats-bar {
    background: #2a2a3e;
    border-radius: 4px;
    height: 8px;
    width: 100%;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.seats-bar-fill {
    background: linear-gradient(90deg, #00ffaa, #00aaff);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

/* --- Detail Table --- */
.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table td {
    padding: 0.6rem 0;
    border-bottom: 1px solid #1a1a2a;
    color: #ccc;
}

.detail-table td.label {
    color: #888;
    width: 140px;
    font-size: 0.9rem;
}

/* --- Registration --- */
.register-container {
    max-width: 700px;
    margin: 1.5rem auto;
}

.register-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 2rem;
}

.register-summary {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a3e;
}

.register-summary h3 {
    margin-top: 0;
    color: #e0e0e0;
}

.register-form h3 {
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #15152a;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.payment-option:hover {
    border-color: #00ffaa;
}

.payment-option input[type="radio"]:checked + .payment-option-content {
    color: #00ffaa;
}

.payment-option input[type="radio"] {
    accent-color: #00ffaa;
    width: 18px;
    height: 18px;
}

.payment-option-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #ccc;
}

.payment-option-content strong {
    color: #e0e0e0;
}

.payment-option-content span {
    font-size: 0.85rem;
    color: #888;
}

.payment-info-box {
    background: #15152a;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.payment-info-box h4 {
    margin-top: 0;
    color: #00aaff;
}

.payment-info-box p {
    color: #ccc;
    margin: 0;
}

.terms-box {
    margin-bottom: 1.5rem;
}

.terms-box label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
}

.terms-box input[type="checkbox"] {
    accent-color: #00ffaa;
    margin-top: 3px;
}

/* --- Seatmap --- */
.seatmap-container {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 2rem;
    overflow-x: auto;
    margin-top: 1rem;
}

.seatmap-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ccc;
    font-size: 0.9rem;
}

.seat-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.seatmap-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
}

.seat-row-label {
    width: 30px;
    text-align: center;
    font-weight: 700;
    color: #888;
    font-size: 0.9rem;
}

.seat-col-label {
    width: 50px;
    text-align: center;
    font-weight: 700;
    color: #888;
    font-size: 0.8rem;
}

.seat {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: default;
    transition: all 0.15s;
    user-select: none;
}

.seat-available {
    background: #1a3a2a;
    border: 2px solid #00ffaa;
    color: #00ffaa;
}

.seat-available[data-selectable="true"] {
    cursor: pointer;
}

.seat-available[data-selectable="true"]:hover {
    background: #00ffaa;
    color: #0f0f1a;
}

.seat-taken {
    background: #3a1a1a;
    border: 2px solid #ff4444;
    color: #ff4444;
    cursor: not-allowed;
}

.seat-yours {
    background: #1a2a3a;
    border: 2px solid #00aaff;
    color: #00aaff;
}

.seat-selected {
    background: #00ffaa !important;
    border-color: #00ffaa !important;
    color: #0f0f1a !important;
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.4);
}

.seatmap-form {
    margin-top: 1.5rem;
}

.seatmap-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

#seat-selection-info {
    color: #888;
    font-size: 0.9rem;
}

.seatmap-info {
    margin-top: 1.5rem;
    text-align: center;
    color: #888;
}

.seatmap-info a {
    color: #00ffaa;
}

/* --- Tickets --- */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ticket-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    overflow: hidden;
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #2a2a3e;
}

.ticket-card-header h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.1rem;
}

.ticket-card-body {
    padding: 1rem 1.25rem;
}

.ticket-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.ticket-code {
    color: #666;
    font-family: monospace;
}

.ticket-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #2a2a3e;
}

/* --- Ticket Detail --- */
.ticket-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ticket-detail-card,
.ticket-orders-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 1.5rem;
}

.ticket-qr-section {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a3e;
}

.ticket-qr {
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.ticket-code-display {
    margin-top: 0.75rem;
    font-family: monospace;
    font-size: 1.1rem;
    color: #00ffaa;
    letter-spacing: 2px;
}

.ticket-orders-card h3 {
    margin-top: 0;
    color: #e0e0e0;
}

/* --- Food Menu --- */
.food-category {
    margin-bottom: 2rem;
}

.category-title {
    color: #00ffaa;
    border-bottom: 2px solid #2a2a3e;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.food-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    padding: 1.25rem;
    transition: border-color 0.2s;
}

.food-card:hover {
    border-color: #00aaff;
}

.food-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.food-card-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #e0e0e0;
}

.food-price {
    font-weight: 700;
    color: #00ffaa;
}

.food-description {
    color: #888;
    font-size: 0.85rem;
    margin: 0 0 0.75rem;
}

.food-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.food-quantity label {
    color: #888;
    font-size: 0.9rem;
}

.quantity-input {
    width: 60px;
    background: #15152a;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    padding: 0.4rem;
    color: #e0e0e0;
    text-align: center;
    font-size: 0.9rem;
}

.quantity-input:focus {
    outline: none;
    border-color: #00ffaa;
}

.food-submit {
    margin-top: 1.5rem;
    text-align: center;
}

.food-orders-section {
    margin-top: 2rem;
}

.food-orders-section h2 {
    color: #e0e0e0;
}

/* --- Admin Dashboard --- */
.admin-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a2a3e;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card-warning {
    border-color: #ffaa00;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ffaa;
    line-height: 1;
}

.stat-card-warning .stat-value {
    color: #ffaa00;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.admin-quick-actions {
    margin-top: 2rem;
}

.admin-quick-actions h2 {
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    padding: 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.quick-action-card:hover {
    border-color: #00ffaa;
    transform: translateY(-2px);
}

.quick-action-card strong {
    color: #e0e0e0;
    font-size: 1rem;
}

.quick-action-card span {
    color: #888;
    font-size: 0.85rem;
}

/* --- Admin Tables & Forms --- */
.admin-section {
    margin-bottom: 2rem;
}

.admin-section h2 {
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e2e;
    border-radius: 10px;
    overflow: hidden;
}

.data-table thead th {
    background: #15152a;
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #2a2a3e;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    color: #ccc;
    border-bottom: 1px solid #1a1a2a;
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: #252540;
}

.data-table tfoot td {
    padding: 0.75rem 1rem;
    color: #e0e0e0;
    border-top: 2px solid #2a2a3e;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Admin Form --- */
.admin-form {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    color: #888;
    font-size: 0.85rem;
}

.form-control {
    background: #15152a;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: #e0e0e0;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #00ffaa;
}

.form-control-sm {
    background: #15152a;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    color: #e0e0e0;
    font-size: 0.8rem;
    width: 140px;
}

.form-control-sm:focus {
    outline: none;
    border-color: #00ffaa;
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

/* --- Filter --- */
.filter-form {
    margin-bottom: 1.5rem;
}

.filter-inline {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-inline .form-control {
    width: auto;
    min-width: 180px;
}

/* --- CSV --- */
.csv-info {
    background: #15152a;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.csv-info p {
    margin: 0.25rem 0;
    color: #999;
    font-size: 0.9rem;
}

.csv-info code {
    background: #0f0f1a;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    color: #00aaff;
    font-size: 0.85rem;
}

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

.upload-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-control-file {
    color: #ccc;
}

.csv-preview {
    margin-top: 1rem;
    background: #15152a;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: #ccc;
    max-height: 200px;
    overflow-y: auto;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: #00aaff;
    color: #0f0f1a;
}

.btn-primary:hover {
    background: #0088cc;
}

.btn-secondary {
    background: transparent;
    border-color: #2a2a3e;
    color: #ccc;
}

.btn-secondary:hover {
    border-color: #00ffaa;
    color: #00ffaa;
}

.btn-accent {
    background: #00ffaa;
    color: #0f0f1a;
}

.btn-accent:hover {
    background: #00cc88;
}

.btn-danger {
    background: #ff4444;
    color: #fff;
}

.btn-danger:hover {
    background: #cc3333;
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(0, 255, 170, 0.15);
    color: #00ffaa;
}

.badge-warning {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
}

.badge-error {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
}

.badge-info {
    background: rgba(0, 170, 255, 0.15);
    color: #00aaff;
}

.badge-secondary {
    background: rgba(136, 136, 136, 0.15);
    color: #888;
}

.badge-accent {
    background: rgba(0, 255, 170, 0.15);
    color: #00ffaa;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.8rem;
}

.subtitle {
    color: #888;
    font-size: 0.95rem;
    margin: 0;
}

.event-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state a {
    color: #00ffaa;
}

/* --- Utility --- */
.text-muted {
    color: #666;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .event-detail-grid,
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .filter-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .seatmap-row {
        gap: 3px;
    }

    .seat {
        width: 36px;
        height: 36px;
        font-size: 0.65rem;
    }

    .admin-nav {
        gap: 0.35rem;
    }

    .admin-nav .btn {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions-cell {
        flex-direction: column;
        gap: 0.35rem;
    }
}
