:root {
    --primary: #2c5e1a;
    --primary-light: #eef7ea;
    --primary-dark: #1e4012;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --warning-light: #fff3cd; /* For first-time guests */
    --warning-border: #ffeeba;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f5f5;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
}

.app-card {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.app-header {
    background-color: var(--primary);
    color: white;
    padding: 20px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center; /* Added */
    padding: 10px 20px;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
    min-height: 50px; /* Added */
}

.settings-btn {
    background: none;
    border: 1px solid var(--gray-400);
    color: var(--gray-700);
    padding: 6px 12px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    gap: 6px;
}

.settings-btn:hover {
    background-color: var(--gray-200);
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-300);
    background-color: var(--gray-100);
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: var(--gray-600);
}

.tab:hover {
    color: var(--primary);
    background-color: var(--gray-200);
}

.tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    background-color: white;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    margin-bottom: 20px;
    background-color: var(--gray-100);
}

.upload-zone.highlight {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.upload-icon {
    font-size: 3rem;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.file-info {
    margin: 15px 0;
    padding: 10px;
    background-color: var(--gray-200);
    border-radius: var(--radius);
    display: none;
    text-align: center;
}

.last-upload-info {
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray-600);
    text-align: center;
    display: none;
}

.action-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 180px;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn:disabled {
    background-color: var(--gray-300);
    color: var(--gray-600);
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--gray-500);
}

.btn-secondary:hover {
    background-color: var(--gray-600);
}

.processing-section {
     margin-top: 30px;
     border-top: 1px solid var(--gray-300);
     padding-top: 20px;
}

.preview-section {
    margin-top: 30px;
    display: none;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.preview-count {
    background-color: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.data-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-300);
}

.data-table th {
    background-color: var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tr:hover {
    background-color: var(--gray-100);
}

.status-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: var(--radius);
    background-color: var(--primary-light);
    color: var(--primary);
    display: none;
}

.status-message.error {
    background-color: #ffe8e8;
    color: #d32f2f;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-panel {
    background-color: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.visible .modal-panel {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-300);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: var(--gray-200);
}

.modal-body {
    padding: 20px;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-300);
    margin-bottom: 20px;
}

.modal-tab {
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.modal-tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.log-container {
    margin-top: 20px;
    max-height: 150px;
    overflow-y: auto;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 10px;
    font-family: monospace;
    font-size: 0.9rem;
    display: none; /* Controlled by JS */
}

.log-entry {
    margin-bottom: 4px;
    line-height: 1.4;
}

.log-entry.error {
    color: #dc3545;
}

.icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
}

.small-icon {
    width: 18px;
    height: 18px;
}

.search-container {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
}

.member-actions { /* Used in Guest Tracking tab */
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.badge-range {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-cart {
    background-color: #d4edda;
    color: #155724;
}

.badge-uptop {
    background-color: #fff3cd;
    color: #856404;
}

.badge-bag-tag {
    background-color: #ffdfb9;
    color: #b95e00;
    margin-left: 5px;
    font-weight: bold;
}

.dropdown-select {
    padding: 6px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background-color: white;
}

.date-indicator { /* Now used for Tee Sheet Date */
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    display: none; /* Initially hidden */
     text-align: center;
}

.first-time-guest {
    background-color: var(--warning-light) !important;
}

@media (max-width: 768px) {
    .tabs { flex-wrap: wrap; }
    .tab { flex: 1 0 50%; text-align: center; padding: 10px; }
    .action-row { flex-direction: column; }
    .btn { width: 100%; }
    .tab-content { padding: 20px 15px; }
}
 @media (max-width: 480px) {
     .tab { flex-basis: 100%; }
 }