/* 区分別背景色（配車グリッド） */
.delivery-出庫 { background: #dbeafe; }
.delivery-入庫 { background: #fee2e2; }
.delivery-借用 { background: #fef9c3; }
.delivery-返却 { background: #dcfce7; }

/* 配車グリッド */
.dispatch-table {
    font-size: 0.9rem;
    border-collapse: collapse;
    width: max-content; /* 内容幅に固定、引き伸ばしなし */
    table-layout: fixed;
}
.dispatch-table th,
.dispatch-table td {
    border: 1px solid #aaa;
    padding: 5px 6px;
    vertical-align: top;
    white-space: nowrap;
}
.dispatch-table thead th {
    background: #e9ecef;
    color: #555;
}
.row-all-done td {
    background: #aaaaaa !important;
    color: #333 !important;
}
.dispatch-table .driver-col {
    width: 160px;
    background: #ffffff;
    font-weight: bold;
    vertical-align: middle;
    text-align: center;
}
.job-cell, .dispatch-table th:not(.driver-col) {
    width: 290px;
    white-space: normal;
    word-break: break-all;
    font-size: 0.88rem;
}
.empty-cell {
    width: 290px;
    background: #f9f9f9;
}
.job-cell .job-field { margin-bottom: 2px; }
.job-cell .job-label {
    font-size: 0.75rem;
    color: #555;
    display: inline-block;
    width: 40px;
    margin-right: 4px;
}
.job-cell .job-value { display: inline; }
.job-cell .btn-group-cell {
    margin-top: 4px;
}
.empty-cell {
    min-width: 130px;
    background: #f9f9f9;
}

/* トップページボタン */
.top-btn {
    width: 200px;
    height: 60px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    color: #fff;
    cursor: pointer;
    margin: 6px;
}

/* ドライバーモバイル画面 */
.driver-screen {
    max-width: 480px;
    margin: 0 auto;
}
.driver-job-card {
    background: #f0f8ff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}
.driver-status-btn {
    height: 70px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
}
.driver-status-btn.btn-start { background: #1a7fe8; color: #fff; border: none; }
.driver-status-btn.btn-end   { background: #0d5ebd; color: #fff; border: none; }
.driver-status-btn.btn-break-start { background: #28a745; color: #fff; border: none; }
.driver-status-btn.btn-break-end   { background: #1e7e34; color: #fff; border: none; }
.driver-status-btn.btn-complete    { background: #dc3545; color: #fff; border: none; }
.driver-nav-next { background: #fd7e14 !important; color: #fff !important; border: none; height: 60px; font-size: 1rem; font-weight: bold; border-radius: 30px; }
.driver-nav-back { background: #6c757d !important; color: #fff !important; border: none; height: 60px; font-size: 1rem; font-weight: bold; border-radius: 6px; }
.current-status-badge {
    font-size: 1rem;
    padding: 6px 16px;
    border-radius: 20px;
}

/* 今日の仕事マスタ */
.jobs-table { font-size: 0.95rem; }
.jobs-table td, .jobs-table th { vertical-align: middle; }

/* ヘッダー */
.app-header {
    background: linear-gradient(135deg, #2d6a2d, #4caf50);
    color: #fff;
    padding: 8px 16px;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.app-header .app-title { font-weight: bold; font-size: 1.1rem; }

/* ドラッグ&ドロップ */
.drag-ghost {
    opacity: 0.4;
    background: #bbdefb !important;
    border: 2px dashed #1976d2 !important;
}
.drag-handle {
    cursor: grab;
    color: #bbb;
    font-size: 0.85rem;
    text-align: right;
    line-height: 1;
    margin-bottom: 2px;
}
.drag-handle:hover { color: #555; }

/* CSV ドラッグ&ドロップゾーン */
.csv-drop-zone {
    border: 2px dashed #adb5bd;
    border-radius: 10px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #f8f9fa;
    user-select: none;
}
.csv-drop-zone:hover       { border-color: #4caf50; background: #f1f8f1; }
.csv-drop-zone.dragover    { border-color: #28a745; background: #e8f5e9; border-style: solid; }
.csv-drop-zone.has-file    { border-color: #28a745; background: #f0fff4; }
.csv-drop-zone .drop-icon  { font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.csv-drop-zone .drop-main  { font-size: 1rem; font-weight: 700; color: #495057; }
.csv-drop-zone .drop-sub   { font-size: 0.78rem; color: #adb5bd; margin-top: 4px; }
.csv-drop-zone .drop-fname { font-size: 0.9rem; font-weight: 700; color: #28a745;
                              margin-top: 10px; display: none; word-break: break-all; }

@media print {
    .no-print { display: none !important; }
    .dispatch-table { font-size: 0.7rem; }
}
