/* ── FEAT-070 Waybill Upload — wbl-* prefix ───────────────────── */

/* Page root */
.wbl-page {
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;
}

/* Header */
.wbl-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.wbl-page-title {
    margin: 0 0 4px 0;
    font-size: 1.35rem;
    font-weight: 700;
}
.wbl-page-subtitle {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.65;
}
.wbl-info-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s, opacity 0.15s;
}
.wbl-info-icon-char {
    font-size: 1.1rem;
    line-height: 1;
}

body[data-theme="dark"]  .wbl-page-title   { color: #e8e8f0; }
body[data-theme="dark"]  .wbl-page-subtitle { color: #888; }
body[data-theme="dark"]  .wbl-info-btn {
    background: #252535; border-color: #444; color: #c0c0d0;
}
body[data-theme="dark"]  .wbl-info-btn:hover { background: #303045; }
body[data-theme="light"] .wbl-page-title   { color: #1a1a2e; }
body[data-theme="light"] .wbl-page-subtitle { color: #666; }
body[data-theme="light"] .wbl-info-btn {
    background: #f0f4ff; border-color: #c0cce8; color: #334;
}
body[data-theme="light"] .wbl-info-btn:hover { background: #e0e8ff; }

/* Step labels */
.wbl-step-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px 0;
    opacity: 0.7;
}

/* Upload card */
.wbl-upload-card {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid;
    position: relative;
}
body[data-theme="dark"]  .wbl-upload-card { background: #1e1e2e; border-color: #333; }
body[data-theme="light"] .wbl-upload-card { background: #fff;    border-color: #dce3ef; }

/* Dropzone */
.wbl-dropzone {
    border: 2px dashed;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 14px;
}
.wbl-dropzone-icon { font-size: 2rem; display: block; margin-bottom: 6px; }
.wbl-dropzone-hint { font-size: 0.75rem; opacity: 0.5; }

body[data-theme="dark"]  .wbl-dropzone { border-color: #444; background: #16162a; color: #aaa; }
body[data-theme="dark"]  .wbl-dropzone:hover { border-color: #4a9eff; background: #1a1a35; }
body[data-theme="light"] .wbl-dropzone { border-color: #b0bcd8; background: #f8faff; color: #556; }
body[data-theme="light"] .wbl-dropzone:hover { border-color: #4a9eff; background: #f0f6ff; }

/* Preview */
.wbl-preview-container { margin-bottom: 14px; }
.wbl-preview-wrap { display: flex; align-items: center; gap: 14px; }
.wbl-preview-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid;
    flex-shrink: 0;
}
body[data-theme="dark"]  .wbl-preview-thumb { border-color: #4a9eff; }
body[data-theme="light"] .wbl-preview-thumb { border-color: #4a9eff; }
.wbl-preview-filename { margin: 0; font-size: 0.8rem; opacity: 0.7; }

/* Upload actions */
.wbl-upload-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wbl-upload-btn {
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    background: #4a9eff;
    color: #fff;
}
.wbl-upload-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wbl-upload-btn:not(:disabled):hover { background: #3a8ef0; }
.wbl-upload-status { font-size: 0.88rem; }
.wbl-status-ok    { color: #43c97a; }
.wbl-status-error { color: #ff5757; }

/* Results container */
.wbl-results-hidden  { display: none; }
.wbl-results-visible {
    border-radius: 10px;
    padding: 20px;
    border: 1px solid;
    margin-bottom: 20px;
}
body[data-theme="dark"]  .wbl-results-visible { background: #1e1e2e; border-color: #333; }
body[data-theme="light"] .wbl-results-visible { background: #fff;    border-color: #dce3ef; }

/* Standby badge */
.wbl-standby-badge {
    display: inline-block;
    background: #ff8c00;
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Side-by-side layout */
.wbl-side-by-side {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
@media (max-width: 700px) {
    .wbl-side-by-side { flex-direction: column; }
}
.wbl-panel-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0 0 10px 0;
    opacity: 0.65;
}

/* Image panel */
.wbl-image-panel {
    flex: 0 0 auto;
    width: 320px;
    max-width: 100%;
}
@media (max-width: 700px) { .wbl-image-panel { width: 100%; } }
.wbl-result-img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid;
    object-fit: contain;
    max-height: 520px;
}
body[data-theme="dark"]  .wbl-result-img { border-color: #333; }
body[data-theme="light"] .wbl-result-img { border-color: #dce3ef; }

/* Form panel */
.wbl-form-panel { flex: 1 1 0; min-width: 0; }

/* Field rows */
.wbl-field-row { display: flex; flex-direction: column; margin-bottom: 10px; }
.wbl-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.75;
}
.wbl-field-input {
    width: 100%;
    padding: 7px 10px;
    border-radius: 5px;
    border: 1px solid;
    font-size: 0.92rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.wbl-field-input:focus { outline: none; border-color: #4a9eff; }

body[data-theme="dark"]  .wbl-field-label { color: #a0a0c0; }
body[data-theme="dark"]  .wbl-field-input {
    background: #16162a; border-color: #3a3a55; color: #e0e0f0;
}
body[data-theme="light"] .wbl-field-label { color: #445; }
body[data-theme="light"] .wbl-field-input {
    background: #f8faff; border-color: #c8d4e8; color: #1a1a2e;
}

/* Trips table */
.wbl-trips-container { margin: 14px 0; }
.wbl-trips-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0 0 8px 0;
    opacity: 0.65;
}
.wbl-trips-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.wbl-trips-table th,
.wbl-trips-table td { padding: 6px 10px; text-align: left; }
.wbl-trips-table .wbl-trips-header th {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid;
    opacity: 0.7;
}
.wbl-trip-no   { width: 50px; font-weight: 600; }
.wbl-trip-time { font-family: monospace; }
.wbl-no-trips  { font-size: 0.85rem; opacity: 0.55; font-style: italic; }

body[data-theme="dark"] .wbl-trips-table .wbl-trips-header th { border-color: #3a3a55; }
body[data-theme="dark"] .wbl-trips-table td { border-bottom: 1px solid #2a2a40; color: #d0d0e8; }
body[data-theme="light"] .wbl-trips-table .wbl-trips-header th { border-color: #c8d4e8; }
body[data-theme="light"] .wbl-trips-table td { border-bottom: 1px solid #e8eef8; color: #334; }

/* Save row */
.wbl-save-row { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.wbl-save-btn {
    padding: 10px 28px;
    border-radius: 6px;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    background: #43c97a;
    color: #fff;
}
.wbl-save-btn:hover { background: #34b86b; }
.wbl-save-status { font-size: 0.88rem; }
.wbl-save-ok    { color: #43c97a; font-weight: 600; }
.wbl-save-ok-icon { font-size: 1.1rem; }
.wbl-save-error { color: #ff5757; }

/* ── Info modal overlay ─────────────────────────────────────── */
.wbl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    overflow-y: auto;
}
.wbl-modal-inner {
    width: 100%;
    max-width: 680px;
    animation: wbl-modal-in 0.18s ease;
}
@keyframes wbl-modal-in {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wbl-modal-content {
    border-radius: 12px;
    padding: 28px 32px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}
body[data-theme="dark"]  .wbl-modal-content { background: #1e1e2e; color: #e0e0f0; }
body[data-theme="light"] .wbl-modal-content { background: #fff;    color: #1a1a2e; }

.wbl-modal-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: opacity 0.15s, background 0.15s;
}
.wbl-modal-close-btn:hover { opacity: 1; }
body[data-theme="dark"]  .wbl-modal-close-btn { color: #e0e0f0; }
body[data-theme="dark"]  .wbl-modal-close-btn:hover { background: #2a2a40; }
body[data-theme="light"] .wbl-modal-close-btn { color: #1a1a2e; }
body[data-theme="light"] .wbl-modal-close-btn:hover { background: #f0f4ff; }

.wbl-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 40px 20px 0;
}
.wbl-modal-section { margin-bottom: 20px; }
.wbl-modal-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 14px 0;
}
body[data-theme="dark"]  .wbl-modal-section-title { color: #4a9eff; }
body[data-theme="light"] .wbl-modal-section-title { color: #2255cc; }
.wbl-modal-divider { margin: 20px 0; opacity: 0.2; }
.wbl-modal-para { font-size: 0.88rem; margin: 0 0 10px 0; opacity: 0.8; }
.wbl-modal-para-bold { font-weight: 600; opacity: 0.95; }

/* Sample box (placeholder image area) */
.wbl-sample-box {
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px dashed;
    text-align: center;
}
body[data-theme="dark"]  .wbl-sample-box { background: #16162a; border-color: #3a3a55; }
body[data-theme="light"] .wbl-sample-box { background: #f4f7ff; border-color: #c0cce8; }
.wbl-sample-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-bottom: 8px;
}
.wbl-sample-placeholder {
    font-size: 0.85rem;
    opacity: 0.45;
    font-style: italic;
    padding: 20px 0;
}
.wbl-sample-img { max-width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid rgba(128,128,128,0.25); }
.wbl-sample-caption { font-size: 0.75rem; opacity: 0.5; margin: 8px 0 0 0; }

/* Checklist */
.wbl-checklist-row {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
}
@media (max-width: 500px) { .wbl-checklist-row { flex-direction: column; } }
.wbl-checklist-col { flex: 1; }
.wbl-checklist-heading {
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 6px 0;
}
.wbl-do   { color: #43c97a; }
.wbl-dont { color: #ff5757; }
.wbl-checklist { margin: 0; padding-left: 18px; font-size: 0.82rem; }
.wbl-checklist li { margin-bottom: 4px; opacity: 0.85; }

/* Notes */
.wbl-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.82rem;
    margin-bottom: 8px;
    opacity: 0.8;
}
.wbl-note-icon { flex-shrink: 0; }

/* Highlight tags (section B) */
.wbl-highlight-area { margin: 10px 0 14px 0; }
.wbl-highlight-row  { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wbl-highlight-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid;
}
body[data-theme="dark"]  .wbl-highlight-tag { background: #252540; border-color: #3a3a60; color: #b0b0e0; }
body[data-theme="dark"]  .wbl-highlight-tag.wbl-tag-primary { background: #1a2a4a; border-color: #4a9eff; color: #4a9eff; }
body[data-theme="light"] .wbl-highlight-tag { background: #f0f4ff; border-color: #c0cce8; color: #445; }
body[data-theme="light"] .wbl-highlight-tag.wbl-tag-primary { background: #e0eeff; border-color: #4a9eff; color: #2255cc; }

/* Sample result box */
.wbl-sample-result-box {
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0 12px 0;
}
body[data-theme="dark"]  .wbl-sample-result-box { background: #16162a; }
body[data-theme="light"] .wbl-sample-result-box { background: #f4f7ff; }
.wbl-sample-result-label { font-size: 0.75rem; opacity: 0.55; margin: 0 0 6px 0; }
.wbl-sample-result-code {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
}
body[data-theme="dark"]  .wbl-sample-result-code { color: #43c97a; }
body[data-theme="light"] .wbl-sample-result-code { color: #2255cc; }

/* PDF preview placeholder (BUG-150) */
.wbl-preview-pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 2px dashed;
    border-radius: 8px;
    text-align: center;
    min-height: 120px;
}
.wbl-preview-pdf-icon { font-size: 3rem; line-height: 1; margin-bottom: 6px; }
.wbl-preview-pdf-hint { margin: 4px 0 0; font-size: 0.8rem; opacity: 0.65; }
body[data-theme="light"] .wbl-preview-pdf { border-color: #c8d4e8; color: #445; }
body[data-theme="dark"]  .wbl-preview-pdf { border-color: #3a3a55; color: #a0a0c0; }

/* ── FEAT-092 Upload loading overlay ──────────────────────────── */
.wbl-upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
    padding: 24px 20px;
    text-align: center;
}
body[data-theme="dark"]  .wbl-upload-overlay { background: rgba(22, 22, 42, 0.96); }
body[data-theme="light"] .wbl-upload-overlay { background: rgba(255, 255, 255, 0.96); }

.wbl-upload-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid;
    border-top-color: #4a9eff;
    border-radius: 50%;
    flex-shrink: 0;
    animation: wbl-spin 0.8s linear infinite;
}
body[data-theme="dark"]  .wbl-upload-spinner { border-color: #333; border-top-color: #4a9eff; }
body[data-theme="light"] .wbl-upload-spinner { border-color: #dce3ef; border-top-color: #4a9eff; }
@keyframes wbl-spin {
    to { transform: rotate(360deg); }
}

.wbl-upload-overlay-msg {
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 280px;
    margin: 0;
    line-height: 1.45;
}
body[data-theme="dark"]  .wbl-upload-overlay-msg { color: #c0c0d0; }
body[data-theme="light"] .wbl-upload-overlay-msg { color: #445; }

.wbl-progress-bar-wrap {
    width: 100%;
    max-width: 280px;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
body[data-theme="dark"]  .wbl-progress-bar-wrap { background: #2a2a40; }
body[data-theme="light"] .wbl-progress-bar-wrap { background: #e0e8f8; }

.wbl-progress-bar-stripe {
    height: 100%;
    width: 40%;
    border-radius: 3px;
    background: #4a9eff;
    animation: wbl-stripe 1.4s ease-in-out infinite;
}
@keyframes wbl-stripe {
    0%   { transform: translateX(-200%); }
    100% { transform: translateX(350%); }
}

.wbl-elapsed {
    font-size: 0.82rem;
    font-family: monospace;
    margin: 0;
    opacity: 0.65;
}
body[data-theme="dark"]  .wbl-elapsed { color: #a0a0c0; }
body[data-theme="light"] .wbl-elapsed { color: #556; }

/* Mobile tweaks */
@media (max-width: 500px) {
    .wbl-page { padding: 12px; }
    .wbl-modal-content { padding: 20px 16px; }
}
