/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #2A3132;
    background-color: #f8f9fa;
}

/* Header styles */
.header {
    background-color: #90AFC5;
    box-shadow: 0 2px 4px rgba(144,175,197,0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 250px;
    height: auto;
    max-width: none;
    min-width: 200px;
    filter: drop-shadow(0 4px 12px rgba(42,49,50,0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 6px 20px rgba(42,49,50,0.4));
}

/* Hamburger menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #2A3132;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav a {
    text-decoration: none;
    color: #2A3132;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    position: relative;
}

.nav a {
    border-right: 1px solid #763626;
    margin-right: 1rem;
    padding-right: 1rem;
}

.nav a:hover {
    background-color: #763626;
    color: #fff;
}

/* Mobile nav styles */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #90AFC5;
    box-shadow: 0 4px 6px rgba(144,175,197,0.2);
    flex-direction: column;
    padding: 1rem;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    text-decoration: none;
    color: #2A3132;
    font-weight: 500;
    padding: 1rem;
    border-bottom: 1px solid #763626;
    transition: background-color 0.3s ease;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    background-color: #763626;
    color: #fff;
}

/* Main content styles */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    text-align: center;
}

.hero-section {
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2A3132;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #763626;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-text {
    font-size: 1.3rem;
    color: #2A3132;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: #5a2a1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(118,54,38,0.3);
}

.btn-secondary {
    background-color: #90AFC5;
    color: #2A3132;
}

.btn-secondary:hover {
    background-color: #7a9bb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(144,175,197,0.3);
}

/* Features section */
.features-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
    margin: 3rem 0;
}

.features-container {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: center;
}

.features-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(42,49,50,0.2);
}

.features-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.image-attributions {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 1rem;
    text-align: center;
}

.image-attributions p {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0.25rem 0;
}

.image-attributions a {
    color: #6c757d;
    text-decoration: none;
}

.image-attributions a:hover {
    color: #763626;
}

.feature-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.feature-icon {
    font-size: 1.5rem;
    color: #28a745;
    font-weight: bold;
    min-width: 30px;
    text-align: left;
}

.feature-item p {
    color: #2A3132;
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* Ensure feature text aligns left even within centered containers */
.features-section,
.features-grid,
.feature-item p {
    text-align: left;
}

/* Blog cards section */
.blog-section {
    margin-top: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: #2A3132;
    margin-bottom: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.blog-card h3 {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2A3132;
    margin-bottom: 1rem;
}

.blog-card p {
    color: #763626;
    line-height: 1.6;
}

/* Footer styles */
.footer {
    background-color: #2A3132;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    position: relative;
}

.footer-section:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #763626;
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #90AFC5;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #90AFC5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #763626;
}

.footer-bottom {
    border-top: 1px solid #763626;
    padding-top: 1rem;
    text-align: center;
    color: #90AFC5;
    font-size: 0.9rem;
}

/* Mobile responsive styles */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }

    .nav {
        display: none;
    }

    .header-container {
        position: relative;
        flex-wrap: wrap;
    }
    
    .install-btn {
        order: 3;
        width: 100%;
        margin-top: 10px;
        margin-left: 0;
    }

    .features-container {
        flex-direction: column;
        gap: 2rem;
    }

    .features-images {
        display: none;
    }

    .features-list {
        max-width: 100%;
    }

    .footer-section:not(:last-child)::after {
        display: none;
    }
}

/* Desktop styles */
@media (min-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .nav {
        gap: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .cta-text {
        font-size: 1.5rem;
    }

    .features-container {
        gap: 4rem;
    }

    .feature-image {
        height: 180px;
    }

    .auth-buttons {
        flex-direction: row;
        max-width: 500px;
        gap: 2rem;
    }

    .btn {
        flex: 1;
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding: 4rem 2rem;
    }

    .hero-section {
        margin-bottom: 5rem;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .features-container {
        gap: 5rem;
    }

    .feature-image {
        height: 200px;
    }

    .blog-section {
        margin-top: 5rem;
    }
}

/* Attributions page styles */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: left;
}

.content-section h1 {
    font-size: 2.5rem;
    color: #2A3132;
    margin-bottom: 1.5rem;
    text-align: center;
}

.content-section h2 {
    font-size: 1.5rem;
    color: #763626;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid #90AFC5;
    padding-bottom: 0.5rem;
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2A3132;
    margin-bottom: 1.5rem;
}

.attribution-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.attribution-list li {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(42,49,50,0.1);
    border-left: 4px solid #90AFC5;
}

.attribution-list strong {
    color: #2A3132;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.attribution-list a {
    color: #763626;
    text-decoration: none;
    font-weight: 500;
}

.attribution-list a:hover {
    color: #5a2a1e;
    text-decoration: underline;
}

.attribution-note {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.attribution-note a {
    color: #763626;
    text-decoration: none;
}

.attribution-note a:hover {
    text-decoration: underline;
}

/* Authentication forms styling */
.auth-section {
    padding: 2rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.auth-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.auth-title {
    font-size: 2.2rem;
    color: #2A3132;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-subtitle {
    font-size: 1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.auth-form {
    background-color: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(42,49,50,0.08);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(144,175,197,0.1);
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2A3132;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #fff;
    color: #2A3132;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #90AFC5;
    box-shadow: 0 0 0 3px rgba(144,175,197,0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: #90AFC5;
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    font-weight: 400;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
    color: #2A3132;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #90AFC5;
}

.btn-full {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

.btn-full:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(144,175,197,0.3);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links p {
    margin: 0.75rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-links a {
    color: #763626;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #5a2a1e;
    text-decoration: underline;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-left: 4px solid;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border-left-color: #dc2626;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border-left-color: #16a34a;
}

/* Desktop responsive for auth forms */
@media (min-width: 768px) {
    .auth-title {
        font-size: 2.5rem;
    }
    
    .auth-subtitle {
        font-size: 1.1rem;
    }
    
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .auth-form {
        padding: 3rem;
    }
    
    .auth-container {
        max-width: 700px;
    }
}

@media (min-width: 1024px) {
    .auth-container {
        max-width: 800px;
    }
    
    .auth-form {
        padding: 3.5rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
}

/* Dashboard Styles */
.dashboard-section {
    padding: 2rem 0;
    min-height: 80vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dashboard-title {
    font-size: 2.5rem;
    color: #2A3132;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(42,49,50,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background-color: transparent;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-button:hover {
    background-color: #f8f9fa;
    color: #2A3132;
}

.tab-button.active {
    background-color: #90AFC5;
    color: white;
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(42,49,50,0.1);
    overflow: hidden;
}

.tab-panel {
    display: none;
    padding: 2rem;
}

.tab-panel.active {
    display: block;
}

/* Load Form Styles */
.load-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    font-size: 1.5rem;
    color: #2A3132;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-section h4 {
    font-size: 1.2rem;
    color: #763626;
    margin-bottom: 1rem;
    font-weight: 500;
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2A3132;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #fff;
    color: #2A3132;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #90AFC5;
    box-shadow: 0 0 0 3px rgba(144,175,197,0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #90AFC5;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
    color: #2A3132;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #90AFC5;
}

/* Additional Stops */
.additional-stops {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.additional-stop {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.remove-stop {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Image Preview */
.image-preview {
    margin-top: 0.5rem;
}

.image-preview img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(42,49,50,0.1);
}

/* Receipt Upload */
.receipt-upload {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
    text-align: center;
}

.receipt-upload label {
    display: block;
    font-weight: 500;
    color: #2A3132;
    margin-bottom: 0.5rem;
}

.receipt-upload input[type="file"] {
    margin: 0 auto;
    display: block;
}

/* Receipt Form */
.receipt-form {
    margin-top: 1rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.receipt-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.receipt-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Receipts List */
.receipts-list {
    margin-top: 1.5rem;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.receipt-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.receipt-category {
    font-weight: 500;
    color: #2A3132;
}

.receipt-amount {
    font-weight: 600;
    color: #763626;
    font-size: 1.1rem;
}

.receipt-notes {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.btn-full {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Current Load & History */
.current-load-content,
.history-content {
    padding: 2rem;
}

.load-info {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-actions .btn {
    flex: 1;
    min-width: 150px;
}

.history-filters {
    margin-bottom: 1.5rem;
}

.history-filters select {
    width: 200px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-export-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.history-export-actions .btn {
    min-width: 160px;
}

.history-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(42,49,50,0.08);
    border: 1px solid #e1e5eb;
}

#history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

#history-table thead {
    background: linear-gradient(90deg, rgba(144,175,197,0.25) 0%, rgba(144,175,197,0.1) 100%);
    border-bottom: 2px solid #90AFC5;
}

#history-table th,
#history-table td {
    padding: 0.85rem 1rem;
    border: 1px solid #dfe3e8;
    text-align: left;
    font-size: 0.95rem;
    vertical-align: top;
    white-space: nowrap;
}

#history-table th {
    font-weight: 700;
    color: #2A3132;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    background-color: rgba(144,175,197,0.15);
}

#history-table tbody tr:nth-child(even) {
    background-color: rgba(144, 175, 197, 0.05);
}

#history-table tbody tr:hover {
    background-color: rgba(144, 175, 197, 0.2);
}

#history-table td {
    color: #3f4547;
    line-height: 1.45;
}

#history-table td:nth-child(2) {
    font-weight: 600;
    color: #763626;
}

#history-table th:nth-child(9),
#history-table td:nth-child(9) {
    min-width: 120px;
    text-align: right;
}

#history-table th.col-pickup-state,
#history-table td.col-pickup-state,
#history-table th.col-delivery-state,
#history-table td.col-delivery-state {
    text-align: center;
    min-width: 65px;
}

#history-table th.col-pickup-city,
#history-table td.col-pickup-city,
#history-table th.col-delivery-city,
#history-table td.col-delivery-city {
    min-width: 120px;
}

#history-table th.col-miles,
#history-table td.col-miles {
    text-align: right;
    min-width: 70px;
}

#history-table th.col-stops,
#history-table td.col-stops {
    text-align: center;
    min-width: 70px;
}

#history-table th.col-pay,
#history-table td.col-pay {
    text-align: right;
}

#history-table th.col-completed,
#history-table td.col-completed {
    min-width: 110px;
}

#history-table .wrap-text {
    white-space: pre-line;
}

#history-table th:nth-child(8),
#history-table td:nth-child(8) {
    text-align: right;
}

.history-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.history-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.history-table-wrapper::-webkit-scrollbar-thumb {
    background: #90AFC5;
    border-radius: 4px;
}

/* Stats & Goals Tab Styles */
.stats-goals-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin: 0 0 10px;
    font-size: 1.1em;
    opacity: 0.9;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin: 5px 0;
}

.stat-sublabel {
    font-size: 0.85em;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.stats-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stats-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

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

.metric-box {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: transform 0.2s;
}

.metric-box:hover {
    transform: translateY(-2px);
}

.metric-box.excellent {
    background: #d4edda;
    border-color: #28a745;
}

.metric-box.good {
    background: #d1ecf1;
    border-color: #17a2b8;
}

.metric-box.warning {
    background: #fff3cd;
    border-color: #ffc107;
}

.metric-box.danger {
    background: #f8d7da;
    border-color: #dc3545;
}

.metric-box.neutral {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.metric-label {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

.metric-goal {
    font-size: 0.85em;
    color: #666;
    margin: 8px 0 0;
}

.metric-sublabel {
    font-size: 0.8em;
    color: #888;
    margin-top: 8px;
}

.breakdown {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.breakdown h4 {
    margin-top: 0;
    color: #555;
}

.breakdown ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.breakdown li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breakdown li:last-child {
    border-bottom: none;
}

.states-list {
    font-size: 1.1em;
    line-height: 1.8;
}

.goals-form {
    max-width: 600px;
}

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

.goals-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.goals-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-top: 0;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }

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

    .stat-value {
        font-size: 2em;
    }

    .metric-value {
        font-size: 1.5em;
    }
}
.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

/* Multi-Stop Inputs */
#additional-stops {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stop-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.stop-input label {
    min-width: 60px;
    font-weight: bold;
    color: #2A3132;
}

.stop-input input[type="text"] {
    flex: 2;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.stop-input select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
}

.remove-stop-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.remove-stop-btn:hover {
    background: #c82333;
}

#add-stop-btn {
    margin-top: 10px;
}

.help-text {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Load Details Display */
.load-details {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(42,49,50,0.1);
    margin-bottom: 2rem;
}

.load-details h4 {
    color: #2A3132;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #90AFC5;
    padding-bottom: 0.75rem;
}

.load-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.load-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #90AFC5;
}

.load-info-item strong {
    color: #2A3132;
    font-weight: 600;
    margin-right: 1rem;
}

.load-info-item span {
    color: #763626;
    font-weight: 500;
}

@media (min-width: 768px) {
    .load-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stop-input {
        gap: 15px;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-panel {
        padding: 3rem;
    }
    
    .receipt-actions {
        flex-wrap: nowrap;
    }
    
    .quick-actions {
        flex-wrap: nowrap;
    }
}

@media (min-width: 1024px) {
    .dashboard-container {
        max-width: 1400px;
    }
    
    .tab-panel {
        padding: 4rem;
    }
    
    .form-section {
        margin-bottom: 3rem;
    }
}

/* OCR Receipt Upload Styles */
.receipt-upload-section {
    margin-bottom: 1.5rem;
    text-align: center;
}

.upload-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #90AFC5;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.upload-btn:hover {
    background: #7a9bb8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(144,175,197,0.3);
}

/* Receipt Form Modal */
.receipt-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.receipt-form-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(42,49,50,0.2);
}

.receipt-form-content h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2A3132;
    font-size: 1.5rem;
    text-align: center;
}

.receipt-preview {
    text-align: center;
    margin-bottom: 1.5rem;
}

.receipt-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(42,49,50,0.1);
}

.receipt-form-content .form-group {
    margin-bottom: 1rem;
}

.receipt-form-content .form-group label {
    display: block;
    font-weight: 500;
    color: #2A3132;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.receipt-form-content .form-group input,
.receipt-form-content .form-group select,
.receipt-form-content .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.receipt-form-content .form-group input:focus,
.receipt-form-content .form-group select:focus,
.receipt-form-content .form-group textarea:focus {
    outline: none;
    border-color: #90AFC5;
    box-shadow: 0 0 0 3px rgba(144,175,197,0.1);
}

.receipt-form-content .form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.receipt-form-content .form-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #90AFC5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-overlay p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.notification-success {
    background-color: #16a34a;
}

.notification-error {
    background-color: #dc2626;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive for OCR */
@media (max-width: 767px) {
    .receipt-form-modal {
        padding: 0.5rem;
    }
    
    .receipt-form-content {
        padding: 1.5rem;
        max-height: 95vh;
    }
    
    .receipt-form-content .form-actions {
        flex-direction: column;
    }
    
    .receipt-form-content .form-actions .btn {
        width: 100%;
    }
    
    .upload-btn {
        width: 100%;
        padding: 1rem;
    }
}

/* Document Preview Viewer */
.doc-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
}

.doc-preview .preview-placeholder {
    margin: 0;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

.preview-note {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
}

.doc-preview-viewer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.doc-preview-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    border-radius: 999px;
    background: #2A3132;
    color: #fff;
}

.doc-preview-tag--receipt {
    background: #1f874d;
}

.doc-preview-tag--rate {
    background: #1f4f87;
}

.rate-upload-section .rate-upload-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rate-upload-section .upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rate-upload-section .upload-hint {
    margin: 0;
    font-size: 0.85em;
    color: #4a5457;
}

.doc-preview-viewer--receipt .doc-preview-nav {
    background: #1f874d;
}

.doc-preview-viewer--rate .doc-preview-nav {
    background: #1f4f87;
}

.current-doc-section {
    margin-top: 20px;
}

.current-receipts-section {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.receipt-card {
    background: #f8f9fa;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    padding: 16px;
}

.receipt-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 8px;
}

.receipt-card-amount {
    font-size: 1.2em;
    font-weight: 700;
    color: #1f874d;
}

.receipt-card-category {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e5eef5;
    color: #1f4f87;
    font-size: 0.85em;
    font-weight: 600;
}

.receipt-card-date {
    font-size: 0.9em;
    color: #6c757d;
}

.receipt-card-notes {
    margin: 0 0 12px 0;
    color: #4a5457;
    font-size: 0.95em;
}

.doc-preview--thumbs .doc-preview-canvas img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.doc-preview--thumbs .doc-preview-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.doc-preview-page-count {
    font-size: 0.85em;
    color: #4a5457;
    font-weight: 600;
}

.doc-preview-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f0f3f8;
    border: 1px solid #dbe2eb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9em;
    color: #2A3132;
    font-weight: 600;
}

.doc-preview-viewer--receipt .doc-preview-controls {
    background: #f1faf5;
    border-color: #c7e7d5;
}

.doc-preview-viewer--rate .doc-preview-controls {
    background: #f0f6ff;
    border-color: #c7d9f3;
}

.doc-preview-nav {
    border: none;
    background: #2A3132;
    color: #fff;
    border-radius: 4px;
    width: 36px;
    height: 32px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.doc-preview-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.doc-preview-nav:active {
    transform: translateY(0);
    box-shadow: none;
}

.doc-preview-canvas {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    padding: 12px;
    min-height: 120px;
}

.doc-preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.doc-preview-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doc-preview-thumb {
    border: 1px solid #cfd6de;
    background: white;
    color: #2A3132;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.doc-preview-thumb:hover {
    background: #eef3f8;
    border-color: #a6b4c3;
}

.doc-preview-thumb.active {
    background: #2A3132;
    color: white;
    border-color: #2A3132;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.doc-preview-viewer--receipt .doc-preview-thumb.active {
    background: #1f874d;
    border-color: #1f874d;
}

.doc-preview-viewer--rate .doc-preview-thumb.active {
    background: #1f4f87;
    border-color: #1f4f87;
}

@media (max-width: 768px) {
    .doc-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .doc-preview-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

/* PWA Install Button */
.install-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
    white-space: nowrap;
    margin-left: auto;
}

.install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #7a8ff0 0%, #8a5fb8 100%);
}

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

/* PWA Install Progress Indicator */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.progress-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.progress-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-text {
    font-size: 1.1em;
    font-weight: 600;
    color: #2A3132;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-status {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0;
}


