/* admin.css - MKT ドライバー管理画面スタイル
 * admin.html の <style> タグから分離: 2026-05-26
 * 読み込み: <link rel="stylesheet" href="./admin.css?v=20260526_1">
 */

/* ============================================================
   メインスタイル（旧 <style> ブロック 1）
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Noto Sans JP', sans-serif; background: #1a1a2e; color: white; }

  /* ログイン画面 */
  #login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #1a1a2e;
  }
  .login-box {
    background: #16213e;
    padding: 40px;
    border-radius: 12px;
    width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }
  .login-box h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 20px;
    color: #fff;
  }
  .login-box p {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 28px;
  }
  .login-box input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.07);
    color: white;
    font-size: 14px;
    outline: none;
  }
  .login-box input:focus { border-color: #c8102e; }
  .login-btn {
    width: 100%;
    padding: 13px;
    background: #c8102e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
  }
  .login-btn:hover { background: #a50d25; }
  #login-error {
    color: #ff6b6b;
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    display: none;
  }

  /* メイン画面 */
  #main-screen { display: none; }
  #header {
    background: #c8102e;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  #header h1 { font-size: 16px; font-weight: 700; letter-spacing: 2px; }
  #logout-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
  }
  #logout-btn:hover { background: rgba(255,255,255,0.3); }

  /* タブ */
  #tab-bar {
    background: #16213e;
    display: flex;
    border-bottom: 2px solid rgba(255,255,255,0.1);
  }
  .tab-btn {
    padding: 10px 24px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
  }
  .tab-btn.active {
    color: white;
    border-bottom-color: #c8102e;
    font-weight: 700;
  }

  /* 地図タブ */
  #map-tab {
    min-height: calc(100vh - 96px);
    background: #111827;
  }
  .map-toolbar {
    min-height: 70px;
    padding: 12px 18px;
    background: #111827;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .map-title-block { min-width: 180px; }
  .map-title { font-size: 16px; font-weight: 800; letter-spacing: 0; }
  .map-subtitle { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,0.55); }
  .map-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }
  .map-controls input,
  .map-controls select {
    height: 36px;
    padding: 0 10px;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    outline: none;
  }
  .map-controls input { width: 220px; }
  .map-controls select { min-width: 128px; }
  .map-controls .map-job-select {
    min-width: 250px;
    max-width: 360px;
  }
  .map-job-target-status {
    min-width: 72px;
    color: rgba(255,255,255,0.58);
    font-size: 11px;
    white-space: nowrap;
  }
  .map-controls button {
    height: 36px;
    padding: 0 12px;
    background: #0f766e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }
  .map-controls button:hover { background: #0d9488; }
  #status-bar.map-status-strip {
    background: #16213e;
    padding: 8px 18px;
    font-size: 12px;
    color: rgba(255,255,255,0.62);
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
  }
  .map-last-update { margin-left: auto; }
  .map-shell {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    min-height: calc(100vh - 166px);
  }
  .map-side-panel {
    background: #111827;
    border-right: 1px solid rgba(255,255,255,0.08);
    min-height: calc(100vh - 166px);
    max-height: calc(100vh - 166px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .map-panel-header {
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .map-panel-title { font-size: 13px; font-weight: 800; }
  .map-panel-meta,
  .map-version { margin-top: 3px; font-size: 11px; color: rgba(255,255,255,0.46); }
  .map-driver-list {
    flex: 1;
    min-height: 160px;
    overflow: auto;
  }
  .map-driver-row {
    width: 100%;
    padding: 11px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: white;
    text-align: left;
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
  }
  .map-driver-row:hover,
  .map-driver-row.selected { background: rgba(255,255,255,0.06); }
  .map-marker-name-label {
    display: inline-block;
    max-width: 128px;
    padding: 3px 8px;
    border: 1px solid rgba(15,23,42,0.16);
    border-radius: 999px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 4px 12px rgba(15,23,42,0.24);
    color: #111827 !important;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .map-marker-name-label-stale {
    border-color: rgba(202,138,4,0.45);
    background: rgba(255,247,204,0.98);
  }
  .map-job-name-label {
    border-color: rgba(15,23,42,0.22);
    background: rgba(255,255,255,0.98);
    box-shadow: 0 5px 16px rgba(15,23,42,0.28);
  }
  .map-driver-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
  }
  .map-driver-name { font-size: 13px; font-weight: 800; line-height: 1.35; }
  .map-driver-meta { margin-top: 3px; font-size: 11px; color: rgba(255,255,255,0.48); line-height: 1.35; }
  .map-driver-age { font-size: 11px; color: rgba(255,255,255,0.58); white-space: nowrap; }
  .map-driver-detail {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 14px;
    min-height: 170px;
    background: #0f172a;
  }
  .map-detail-title { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
  .map-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .map-detail-cell {
    padding: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
  }
  .map-detail-label { font-size: 10px; color: rgba(255,255,255,0.42); margin-bottom: 3px; }
  .map-detail-value { font-size: 12px; color: rgba(255,255,255,0.88); word-break: break-word; }
  .map-detail-link {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 8px 10px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
  }
  .map-empty-state {
    padding: 18px 14px;
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    line-height: 1.55;
  }
  .map-canvas-wrap {
    position: relative;
    min-height: calc(100vh - 166px);
    background: #0f172a;
  }
  #map { width: 100%; height: 100%; min-height: calc(100vh - 166px); }
  .legend {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(15,23,42,0.88);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 100;
    backdrop-filter: blur(8px);
  }
  .legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: rgba(255,255,255,0.88); }
  .legend-item:last-child { margin-bottom: 0; }
  .legend-dot { width: 11px; height: 11px; border-radius: 50%; }
  @media (max-width: 900px) {
    .map-toolbar { align-items: stretch; flex-direction: column; }
    .map-controls { justify-content: flex-start; }
    .map-controls input { width: min(100%, 260px); }
    .map-shell { grid-template-columns: 1fr; }
    .map-side-panel {
      order: 2;
      max-height: none;
      min-height: 360px;
      border-right: none;
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .map-canvas-wrap { min-height: 56vh; }
    #map { min-height: 56vh; }
    .map-last-update { margin-left: 0; }
  }

  /* ドライバー一覧タブ */
  #users-tab {
    display: none;
    padding: 20px;
  }
  .users-tab-inner { max-width: 1100px; margin: 0 auto; }

  /* ドライバー登録フォーム */
  .user-form-card {
    background: #16213e;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 28px;
  }
  .user-form-card h3 { font-size: 14px; margin-bottom: 18px; color: rgba(255,255,255,0.7); letter-spacing: 1px; }
  .user-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  #user-form-msg { margin-top: 10px; font-size: 13px; display: none; }

  /* ユーザーテーブル */
  .table-wrap { overflow-x: visible; }
  .table-wrap table,
  #account-list table,
  #inv-list-container table,
  #nip-table {
    width: 100%;
    table-layout: fixed;
  }
  .table-wrap th,
  .table-wrap td,
  #account-list th,
  #account-list td,
  #inv-list-container th,
  #inv-list-container td,
  #nip-table th,
  #nip-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* 案件管理タブ */
  #jobs-tab {
    display: none;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
  }
  #jobs-tab h2 { font-size: 16px; margin-bottom: 16px; color: rgba(255,255,255,0.9); }

  /* 案件登録フォーム */
  .job-form-card {
    background: #16213e;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 28px;
  }
  .job-form-card h3 { font-size: 14px; margin-bottom: 18px; color: rgba(255,255,255,0.7); letter-spacing: 1px; }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .form-grid .full { grid-column: 1 / -1; }
  .form-group label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    outline: none;
    font-family: inherit;
  }
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus { border-color: #c8102e; }
  .form-group select option { background: #16213e; }
  .form-group textarea { resize: vertical; min-height: 60px; }
  .client-master-hint {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255,255,255,0.52);
  }
  .client-master-hint.matched { color: #8ef0b4; }
  .client-master-hint.new { color: #fbbf24; }
  .client-master-hint.warning { color: #facc15; }
  .client-master-hint.error { color: #ff8a8a; }
  .submit-btn {
    margin-top: 18px;
    padding: 11px 28px;
    background: #c8102e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
  }
  .submit-btn:hover { background: #a50d25; }
  #job-form-msg { margin-top: 10px; font-size: 13px; display: none; }
  .msg-success { color: #2ecc71; }
  .msg-error   { color: #e74c3c; }

  #dashboard-tab > div,
  #invoice-tab > div,
  #nippou-tab > div,
  #account-tab > div,
  #rates-tab > div,
  .users-tab-inner,
  #jobs-tab {
    max-width: min(1560px, calc(100vw - 40px)) !important;
  }

  #inv-list-container,
  #account-list,
  .table-wrap {
    overflow-x: visible !important;
  }

  /* 配車表 */
  #dispatch-tab {
    padding: 20px;
    max-width: 1480px;
    margin: 0 auto;
  }
  .dispatch-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
  }
  .dispatch-page-head h2 {
    margin: 0 0 5px;
    font-size: 18px;
    color: rgba(255,255,255,0.92);
  }
  .dispatch-page-sub {
    color: rgba(255,255,255,0.52);
    font-size: 12px;
  }
  .dispatch-head-actions,
  .dispatch-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .dispatch-head-actions button,
  .dispatch-filter-actions button {
    min-height: 34px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: #16213e;
    color: white;
    cursor: pointer;
    font-size: 12px;
  }
  .dispatch-head-actions button.primary,
  .dispatch-filter-actions button.primary {
    background: #c8102e;
    border-color: #c8102e;
    font-weight: 700;
  }
  .dispatch-head-actions input,
  .dispatch-filter-grid select,
  .dispatch-filter-grid input {
    min-height: 34px;
    box-sizing: border-box;
    padding: 8px 10px;
    background: #0f3460;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    outline: none;
  }
  .dispatch-filter-card {
    background: #16213e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
  }
  .dispatch-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }
  .dispatch-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: rgba(255,255,255,0.55);
    font-size: 11px;
  }
  .dispatch-summary {
    flex: 1;
    min-width: 220px;
    color: rgba(255,255,255,0.62);
    font-size: 12px;
    line-height: 1.5;
  }
  .dispatch-board-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 12px;
    align-items: start;
  }
  .dispatch-board-main,
  .dispatch-side {
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    overflow: hidden;
  }
  .dispatch-board-main {
    min-width: 0;
    overflow-x: hidden;
  }
  .dispatch-axis-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-width: 0;
    border-bottom: 1px solid #cbd5e1;
    background: #eef4f8;
    position: sticky;
    top: 0;
    z-index: 3;
  }
  .dispatch-axis-label {
    padding: 12px 12px;
    font-size: 12px;
    color: #475569;
    font-weight: 800;
    border-right: 1px solid #cbd5e1;
  }
  .dispatch-time-head {
    position: relative;
    height: 42px;
    background:
      repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 24 - 1px), #d4dce6 calc(100% / 24 - 1px), #d4dce6 calc(100% / 24));
  }
  .dispatch-hour-label {
    position: absolute;
    top: 9px;
    transform: translateX(-50%);
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }
  .dispatch-hour-label.edge-start {
    transform: translateX(0);
  }
  .dispatch-hour-label.edge-end {
    transform: translateX(-100%);
  }
  .dispatch-hour-label.major {
    color: #334155;
    font-size: 12px;
  }
  .dispatch-grid {
    min-width: 0;
  }
  .dispatch-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: 78px;
    border-bottom: 1px solid #e2e8f0;
  }
  .dispatch-resource {
    background: #d8f5ec;
    border-right: 1px solid #cbd5e1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
  .dispatch-resource-name {
    font-size: 13px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.35;
  }
  .dispatch-resource-meta {
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
  }
  .dispatch-lane {
    position: relative;
    min-height: 78px;
    background:
      repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 24 - 1px), #dbe2ea calc(100% / 24 - 1px), #dbe2ea calc(100% / 24)),
      linear-gradient(to bottom, #fff, #fff);
  }
  .dispatch-card {
    position: absolute;
    top: 10px;
    min-width: 94px;
    min-height: 46px;
    box-sizing: border-box;
    border-radius: 7px;
    border: 2px solid #0ea5e9;
    background: #d7f8ef;
    box-shadow: 0 2px 6px rgba(15,23,42,0.16);
    padding: 7px 9px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    overflow: hidden;
  }
  .dispatch-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(14,165,233,0.24);
  }
  .dispatch-card.completed {
    background: #dcfce7;
    border-color: #22c55e;
  }
  .dispatch-card.unassigned {
    background: #fff7ed;
    border-color: #fb923c;
  }
  .dispatch-card-title {
    font-size: 12px;
    color: #075985;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dispatch-card-time {
    margin-top: 3px;
    font-size: 11px;
    color: #0369a1;
    font-weight: 700;
  }
  .dispatch-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 4px;
    font-size: 10px;
    color: #0f766e;
    white-space: nowrap;
  }
  .dispatch-side {
    min-height: 360px;
    background: #fff;
  }
  .dispatch-side-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #dbe2ea;
  }
  .dispatch-side-tabs button {
    padding: 11px 8px;
    border: 0;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    border-bottom: 3px solid transparent;
  }
  .dispatch-side-tabs button.active {
    color: #0284c7;
    border-bottom-color: #0284c7;
  }
  .dispatch-side-tabs button:disabled {
    color: #a3aab4;
  }
  .dispatch-unassigned-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 620px;
    overflow-y: auto;
  }
  .dispatch-unassigned-item {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #fb923c;
    border-radius: 7px;
    padding: 9px 10px;
    cursor: pointer;
    background: #fff;
    font-family: inherit;
    text-align: left;
  }
  .dispatch-unassigned-item:hover {
    border-color: #93c5fd;
    background: #f8fbff;
  }
  .dispatch-unassigned-title {
    font-size: 12px;
    color: #1f2937;
    font-weight: 800;
    line-height: 1.35;
  }
  .dispatch-unassigned-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
  }
  .dispatch-empty {
    padding: 28px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
  }
  .dispatch-empty.small {
    padding: 18px 8px;
    font-size: 12px;
  }
  @media (max-width: 980px) {
    #dispatch-tab { padding: 14px; }
    .dispatch-page-head { flex-direction: column; }
    .dispatch-filter-grid { grid-template-columns: 1fr 1fr; }
    .dispatch-board-shell { grid-template-columns: 1fr; }
  }
  @media (max-width: 620px) {
    .dispatch-filter-grid { grid-template-columns: 1fr; }
  }

  /* 案件一覧 */
  .jobs-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }
  .jobs-list-header h3 { font-size: 14px; color: rgba(255,255,255,0.7); }
  #jobs-refresh-btn {
    padding: 7px 16px;
    background: #16213e;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
  }
  #jobs-refresh-btn:hover { background: rgba(255,255,255,0.1); }
  .filter-bar { display: flex; gap: 8px; margin-bottom: 14px; }
  .filter-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background: none;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    cursor: pointer;
  }
  .filter-btn.active { background: #c8102e; border-color: #c8102e; color: white; font-weight: 700; }
  .job-card {
    background: #16213e;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 10px;
    border-left: 3px solid #333;
    transition: border-color 0.2s;
  }
  .job-card.unassigned { border-left-color: #e67e22; }
  .job-card.assigned   { border-left-color: #2980b9; }
  .job-card.completed  { border-left-color: #27ae60; }
  .job-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .job-code { font-size: 11px; color: rgba(255,255,255,0.4); font-family: monospace; }
  .job-title { font-size: 14px; font-weight: 700; flex: 1; }
  .status-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
  }
  .status-unassigned { background: #e67e22; color: white; }
  .status-assigned   { background: #2980b9; color: white; }
  .status-completed  { background: #27ae60; color: white; }
  .job-card-body { font-size: 12px; color: rgba(255,255,255,0.6); display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .job-card-body span { white-space: nowrap; }
  #jobs-tbody-cards { margin-top: 4px; }

  /* アサインボタン */
  .assign-btn {
    margin-top: 10px;
    padding: 6px 14px;
    background: #2980b9;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
  }
  .assign-btn:hover { background: #1f6391; }
  .reassign-btn {
    margin-top: 10px;
    margin-left: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
  }
  .reassign-btn:hover { background: rgba(255,255,255,0.15); }

  /* モーダル */
  #assign-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
  }
  #assign-modal.show { display: flex; }
  #dup-modal.show { display: flex; }
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
  }
  .modal-box {
    background: #16213e;
    border-radius: 12px;
    padding: 28px;
    width: 440px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  }
  .modal-box h3 { font-size: 15px; margin-bottom: 6px; }
  .modal-job-name { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 18px; }
  .modal-driver-list { flex: 1; overflow-y: auto; margin-bottom: 18px; }
  .driver-check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .driver-check-item:hover { background: rgba(255,255,255,0.07); }
  .driver-check-item input[type=checkbox] {
    width: 16px; height: 16px; cursor: pointer; accent-color: #c8102e;
  }
  .driver-info { flex: 1; }
  .driver-info .d-name { font-size: 13px; font-weight: 700; }
  .driver-info .d-sub  { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }
  .online-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #27ae60; flex-shrink: 0;
  }
  .online-dot.offline { background: #555; }
  .modal-actions { display: flex; gap: 10px; }
  .modal-confirm-btn {
    flex: 1;
    padding: 11px;
    background: #c8102e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  .modal-confirm-btn:hover { background: #a50d25; }
  .modal-cancel-btn {
    padding: 11px 20px;
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
  }
  .modal-cancel-btn:hover { background: rgba(255,255,255,0.13); }
  #assign-modal-msg { font-size: 12px; margin-top: 10px; display: none; text-align: center; }
  #users-tab h2 {
    font-size: 16px;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
  }
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 700px;
  }
  thead tr { background: #c8102e; }
  thead th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
  }
  tbody tr { border-bottom: 1px solid rgba(255,255,255,0.07); }
  tbody tr:hover { background: rgba(255,255,255,0.05); }
  tbody td { padding: 10px 14px; color: rgba(255,255,255,0.85); }
  .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
  }
  .badge-owner   { background: #c8102e; color: white; }
  .badge-manager { background: #e67e22; color: white; }
  .badge-driver  { background: #2980b9; color: white; }
  .badge-free    { background: #27ae60; color: white; }
  .badge-trial   { background: #f39c12; color: white; }
  .badge-paid    { background: #8e44ad; color: white; }
  .badge-online  { background: #27ae60; color: white; }
  .badge-offline { background: #555; color: #aaa; }
  .pw-cell { font-family: monospace; font-size: 11px; color: rgba(255,255,255,0.4); }
  #refresh-btn {
    margin-bottom: 16px;
    padding: 8px 18px;
    background: #16213e;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
  }
  #refresh-btn:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   請求書印刷エリア（旧 <style> ブロック 2）
   ============================================================ */
#invoice-print-area tbody td, #invoice-print-area th { color: #333 !important; }

/* ============================================================
   ドライバー編集ボタン（旧 <style> ブロック 3）
   ============================================================ */
.btn-edit-drv{background:rgba(79,70,229,.18);border:1px solid rgba(79,70,229,.4);border-radius:4px;color:#a5b4fc;padding:4px 10px;font-size:12px;cursor:pointer;transition:background .2s,color .2s}
.btn-edit-drv:hover{background:rgba(79,70,229,.45);color:#fff}
#edit-driver-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.76);z-index:9999;align-items:center;justify-content:center}
.edm-box{background:#0f0f23;border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:28px;width:430px;max-width:92vw}
.edm-box h3{color:#fff;margin:0 0 20px;font-size:15px;font-weight:600}
.edm-field{margin-bottom:14px}
.edm-field label{display:block;color:rgba(255,255,255,.45);font-size:11px;margin-bottom:5px;text-transform:uppercase;letter-spacing:.06em}
.edm-field input{width:100%;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);border-radius:7px;color:#fff;padding:9px 12px;box-sizing:border-box;font-size:13px;outline:none;transition:border-color .2s}
.edm-field input:focus{border-color:rgba(79,70,229,.55)}
.edm-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:22px}
.edm-btns button{border:none;border-radius:7px;padding:9px 20px;font-size:13px;cursor:pointer;font-weight:500}
.edm-cancel{background:rgba(255,255,255,.08);color:rgba(255,255,255,.65)}
.edm-save{background:#4f46e5;color:#fff}
.edm-save:hover{background:#4338ca}
#edm-msg{font-size:12px;margin-top:10px;display:none;padding:6px 10px;border-radius:5px}
.edm-sep{border:none;border-top:1px solid rgba(255,255,255,.07);margin:18px 0}
