* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #2c5aa0;
    margin-bottom: 30px;
}

header h1 {
    color: #2c5aa0;
    font-size: 1.5rem;
}

#auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-email {
    font-size: 0.9rem;
    color: #666;
}

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

.card h2 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #2c5aa0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background-color: #2c5aa0;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #234a80;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.9rem;
}

.delete-btn:hover {
    color: #c82333;
    text-decoration: underline;
}

.delete-details {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Today's log table */
.summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

#today-date {
    font-weight: 500;
    color: #2c5aa0;
}

#today-stats {
    font-size: 0.9rem;
    color: #666;
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.entries-table th,
.entries-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.entries-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #444;
}

.entries-table tr:hover {
    background-color: #f8f9fa;
}

.entries-table .gallons {
    font-weight: 500;
    color: #2c5aa0;
}

.entries-table .time {
    color: #666;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

#today-entries {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Equipment info panel */
.equipment-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.info-row {
    display: flex;
    margin-bottom: 6px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
    color: #666;
    width: 100px;
    flex-shrink: 0;
}

.info-row span:last-child {
    color: #333;
}

/* Warning message */
.warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
    color: #555;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content .form-group input:focus {
    outline: none;
    border-color: #2c5aa0;
}

/* File upload area */
.file-upload-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#selected-file-name {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .container {
        padding: 15px;
    }

    .card {
        padding: 16px;
    }

    .summary {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .entries-table {
        font-size: 0.8rem;
    }

    .entries-table th,
    .entries-table td {
        padding: 8px 4px;
    }

    .info-row {
        flex-direction: column;
    }

    .info-label {
        width: auto;
        margin-bottom: 2px;
    }
}
