:root {
    --primary-color: #2e7d32;
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --accent-color: #8bc34a;
    --bg-color: #f0f4f0;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-bold: 0 8px 30px rgba(46, 125, 50, 0.15);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    width: 100%;
}

header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.25rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:active {
    transform: scale(0.99);
}

h2 {
    color: var(--primary-dark);
    margin-top: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Summary Dashboard */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: var(--shadow-soft);
    border-bottom: 3px solid var(--accent-color);
}

.summary-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* Forms */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.file-select-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e8f5e9;
    color: var(--primary-dark);
    padding: 2.5rem 1.5rem;
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-select-label:hover {
    background: #c8e6c9;
}

.file-select-label input[type="file"] {
    display: none;
}

.selected-filename {
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    transition: all 0.3s;
    width: 100%;
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(46, 125, 50, 0.2);
}

/* Flight List */
.flight-card {
    border-left: 6px solid var(--primary-color);
    padding: 1.25rem;
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.flight-header strong {
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.player-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f9f9f9;
}

.player-item:last-child {
    border-bottom: none;
}

.player-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.player-hcp {
    background: #f1f8e9;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-dark);
    border: 1px solid #dcedc8;
}

/* Bagdes & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.4rem;
    margin-right: 0.4rem;
}

.badge-dining {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.badge-handicart {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.player-note {
    background: #fcfcfc;
    border-left: 2px solid #ddd;
    padding: 0.4rem 0.6rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    font-style: italic;
    color: #666;
}

/* Payment UI */
.payment-area {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.btn-pay {
    background: #eee;
    color: #444;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-pay:hover {
    background: #e0e0e0;
}

.btn-pay.paid {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-pay.paid::before {
    content: '✓';
}

/* Footer */
.main-footer {
    background: #fff;
    padding: 1.5rem 0;
    margin-top: auto;
    text-align: center;
    border-top: 1px solid #eee;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.main-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (min-width: 650px) {
    .summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .flight-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.25rem;
    }

    .btn {
        width: auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}