/* =========================
   MODERN SPORT UI - GREEN & LIGHT GRAY THEME
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

:root {
    --primary: #0a5c08;
    --primary-dark: #074506;
    --primary-light: #2a7a28;
    --secondary: #0a5c08;
    --secondary-dark: #074506;
    --accent: #0a5c08;
    --dark: #2c3e50;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --light: #f8f9fa;
    --white: #ffffff;
    --danger: #e74c3c;
    --warning: #f39c12;
    --success: #0a5c08;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
}

body {
    background: linear-gradient(135deg, var(--light) 0%, #e2e6ea 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* =========================
   NAVBAR
========================= */
.navbar {
    background: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--primary);
}

.navbar .logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.nav-right {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-right a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.nav-right a:hover {
    background: var(--primary);
    color: var(--white);
}

.corp-logo {
    height: 50px;
    width: auto;
}

/* =========================
   CONTAINER & GRID
========================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 28px;
}

/* =========================
   CARDS
========================= */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(10, 92, 8, 0.1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 16px 24px;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card > :not(h3) {
    padding: 20px 24px;
}

/* Profile specific */
.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

/* =========================
   FORMS & INPUTS
========================= */
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--white);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 92, 8, 0.1);
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: var(--dark);
}

/* =========================
   BUTTONS
========================= */
button, .btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

button, .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

button:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.05);
}

.btn-secondary {
    background: var(--gray);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    color: var(--white);
}

/* =========================
   GAME ITEMS
========================= */
.game {
    background: var(--light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.2s ease;
}

.game:hover {
    background: #e8f5e8;
    transform: translateX(4px);
}

.game img {
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* =========================
   MODALS
========================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box, .modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 450px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
    border-top: 4px solid var(--primary);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* =========================
   CORP LOGIN PAGE
========================= */
.corp-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.corp-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 420px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-top: 4px solid var(--primary);
}

.corp-card h2 {
    color: var(--primary);
    margin-bottom: 8px;
}

.corp-card .sub {
    color: var(--gray);
    margin-bottom: 32px;
}

.corp-card input {
    margin-bottom: 16px;
}

.corp-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

.corp-switch {
    margin-top: 24px;
    color: var(--gray);
}

.corp-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.corp-switch a:hover {
    text-decoration: underline;
}

/* =========================
   CENTER BOX (LOGIN)
========================= */
.center-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 420px;
    max-width: 90%;
    margin: 50px auto;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-top: 4px solid var(--primary);
}

.center-box h2 {
    color: var(--primary);
    margin-bottom: 24px;
}

.center-box .error {
    color: var(--danger);
    margin-top: 16px;
    font-size: 14px;
}

/* =========================
   VIDEO CAPTURE
========================= */
video {
    width: 100%;
    border-radius: var(--radius);
    margin: 12px 0;
    border: 2px solid var(--primary);
}

canvas {
    display: none;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .navbar {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .corp-wrapper {
        flex-direction: column;
        padding: 20px;
    }
    
    .corp-card, .center-box {
        padding: 32px 24px;
    }
    
    .card h3 {
        font-size: 1.1rem;
        padding: 12px 16px;
    }
    
    .card > :not(h3) {
        padding: 16px;
    }
    
    button {
        width: 100%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .game {
        font-size: 14px;
    }
    
    .avatar {
        width: 70px;
        height: 70px;
    }
}

/* =========================
   UTILITIES
========================= */
.error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 8px;
}

.success {
    color: var(--success);
    font-size: 14px;
    margin-top: 8px;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

/* Additional admin-specific styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card i {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 28px;
    font-weight: 700;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-booked {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* QR Scanner container */
#reader {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
}

/* User search results */
#userResults .user-item {
    padding: 12px;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: background 0.2s;
}

#userResults .user-item:hover {
    background: var(--light);
}

/* Table styles for admin tables */
#bookingsBox table,
#todayBox table,
#cancelBox table {
    width: 100%;
    border-collapse: collapse;
}

#bookingsBox th,
#todayBox th,
#cancelBox th {
    text-align: left;
    padding: 10px;
    background: var(--light);
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
}

#bookingsBox td,
#todayBox td,
#cancelBox td {
    padding: 10px;
    border-bottom: 1px solid var(--gray-light);
}

/* Small button variant */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0 4px;
}

/* Search input */
.search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 14px;
}

.search-input:focus {
    border-color: var(--primary);
}

/* Game card styles */
.game-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
    border-left: 4px solid var(--primary);
}

.game-card:hover {
    transform: translateX(4px);
    background: #e8f5e8;
}

.qr-code-img {
    width: 80px;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s;
}

.qr-code-img:hover {
    transform: scale(1.05);
}

/* Dashboard header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    color: white;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.dashboard-header p {
    margin: 5px 0 0;
    opacity: 0.9;
}

.member-badge {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Form grid layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Video container */
.video-container {
    background: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 15px 0;
}

video {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
}

/* Welcome badge */
.welcome-badge {
    background: linear-gradient(105deg, var(--white) 0%, var(--light) 100%);
    border-radius: var(--radius-lg);
    padding: 18px 28px;
    margin-bottom: 32px;
    border-left: 8px solid var(--primary);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
}

.welcome-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.welcome-text p {
    color: var(--gray);
    margin-top: 4px;
}

.arena-chip {
    background: #e8f5e8;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}