/* -----------------------------------------------------------------------
   style.css
   Modern, minimal, responsive styling for Uber Fare Fetcher.
   No external CSS frameworks used.
----------------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.subtitle {
    color: #666;
    margin-top: 0;
    margin-bottom: 28px;
    font-size: 14px;
}

/* ---- Card ------------------------------------------------------------ */
.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 24px;
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
}

/* ---- Upload row -------------------------------------------------------- */
.upload-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

input[type="file"] {
    flex: 1;
    min-width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.hint {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
}

.hint code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: #1a1a1a;
    color: #fff;
}

.btn-primary:hover {
    background: #000;
}

.btn-secondary {
    background: #f2f2f2;
    color: #1a1a1a;
}

.btn-secondary:hover {
    background: #e6e6e6;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Progress bar -------------------------------------------------------- */
.progress-section {
    margin-top: 20px;
}

.progress-bar-track {
    background: #f0f0f0;
    border-radius: 20px;
    height: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #1a1a1a;
    border-radius: 20px;
    transition: width 0.25s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    margin-top: 8px;
}

/* ---- Stats card -------------------------------------------------------- */
.stats-card {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
    gap: 16px;
}

.stat {
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* ---- Results header ------------------------------------------------------ */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.results-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    min-width: 220px;
}

/* ---- Table ------------------------------------------------------------ */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    text-align: left;
    background: #fafafa;
    padding: 10px 12px;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

tbody tr:hover {
    background: #fafafa;
}

.empty-cell {
    text-align: center;
    color: #999;
    padding: 30px !important;
}

.na-cell {
    color: #bbb;
}

.error-row {
    background: #fff6f6;
}

/* ---- Utility ------------------------------------------------------------ */
.hidden {
    display: none !important;
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 640px) {
    .container {
        padding: 20px 14px 40px;
    }

    .upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 0;
        width: 100%;
    }
}
