  <style>
    html {
      scroll-behavior: auto; /* ページ切り替え時は即座にスクロール */
    }
    
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    
    body {
      font-family: 'Noto Sans JP', sans-serif;
      background: #f5f7fa;
      color: #2d3748;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      padding-bottom: 72px; /* ボトムナビ分 */
    }
    
    /* ヘッダー */
    .header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 60px;
      background: #1B3A6B;
      color: white;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      z-index: 1000;
    }
    
    .header-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    
    .header-logo-img {
      width: 40px;
      height: 40px;
      object-fit: contain;
    }
    
    .header-title {
      font-size: 14px;
      font-weight: 500;
      opacity: 0.95;
    }
    
    .header-center {
      font-size: 13px;
      font-weight: 400;
      opacity: 0.9;
    }
    
    .header-right {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    
    .header-notification {
      position: relative;
      font-size: 22px;
      cursor: pointer;
      opacity: 0.9;
      transition: opacity 0.2s;
    }
    
    .header-notification:hover {
      opacity: 1;
    }
    
    .notification-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      background: #EF4444;
      color: white;
      font-size: 10px;
      font-weight: 600;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .header-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, #29ABE2, #1B3A6B);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      border: 2px solid rgba(255,255,255,0.3);
    }
    
    /* メインコンテンツ */
    .main-content {
      margin-top: 60px;
      padding: 16px;
      max-width: 768px;
      margin-left: auto;
      margin-right: auto;
    }
    
    .page {
      display: none;
    }
    
    .page.active {
      display: block;
      animation: fadeIn 0.3s ease-in-out;
    }
    
    /* 在庫ページは固定レイアウト */
    #page-inventory.active {
      position: fixed;
      top: 60px;
      left: 0;
      right: 0;
      bottom: 72px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: #f8fafc;
      z-index: 10;
      padding: 0;
      margin: 0;
      max-width: none;
    }
    
    /* 顧客ページは固定レイアウト */
    #page-customers.active {
      position: fixed;
      top: 60px;
      left: 0;
      right: 0;
      bottom: 72px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: #f8fafc;
      z-index: 10;
      padding: 0;
      margin: 0;
      max-width: none;
    }
    
    /* 案件ページは固定レイアウト */
    #page-projects.active {
      position: fixed;
      top: 60px;
      left: 0;
      right: 0;
      bottom: 72px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: #f8fafc;
      z-index: 10;
      padding: 0;
      margin: 0;
      max-width: none;
    }
    
    /* 案件ページ：レスポンシブデザイン */
    
    /* 案件タイプバッジ（修理・販売） */
    .project-type-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
    }
    
    .project-type-badge.repair {
      background: #EFF6FF;
      color: #1E40AF;
      border: 1px solid #BFDBFE;
    }
    
    .project-type-badge.sales {
      background: #FEF3C7;
      color: #92400E;
      border: 1px solid #FDE68A;
    }
    
    /* 案件カード */
    .project-card {
      background: white;
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 12px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      cursor: pointer;
      transition: transform 0.15s, box-shadow 0.15s;
      border-left: 4px solid transparent;
    }
    
    .project-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    }
    
    .project-card.repair {
      border-left-color: #3B82F6;
    }
    
    .project-card.sales {
      border-left-color: #F59E0B;
    }
    
    /* モバイル（iPhone） */
    @media (max-width: 767px) {
      .project-card {
        padding: 12px;
        margin-bottom: 10px;
      }
      
      .project-type-toggle {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
      }
      
      .project-type-toggle button {
        flex: 1;
        padding: 10px 16px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        background: white;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s;
      }
      
      .project-type-toggle button.active.repair {
        background: #3B82F6;
        color: white;
        border-color: #3B82F6;
      }
      
      .project-type-toggle button.active.sales {
        background: #F59E0B;
        color: white;
        border-color: #F59E0B;
      }
      
      .projects-list-grid {
        display: block;
      }
    }
    
    /* タブレット（iPad） */
    @media (min-width: 768px) and (max-width: 1023px) {
      .projects-list-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 20px;
      }
      
      .project-card {
        margin-bottom: 0;
      }
    }
    
    /* デスクトップ（PC） */
    @media (min-width: 1024px) {
      #page-projects.active {
        display: grid;
        grid-template-columns: 280px 1fr;
        padding: 0;
      }
      
      .projects-sidebar {
        background: white;
        border-right: 1px solid #e2e8f0;
        overflow-y: auto;
        padding: 20px;
      }
      
      .projects-main-content {
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      
      .projects-list-grid {
        display: block;
        padding: 20px;
      }
      
      .project-card {
        display: grid;
        grid-template-columns: 40px 200px 1fr 150px 120px 150px 120px;
        align-items: center;
        gap: 16px;
        padding: 16px 20px;
        border-radius: 8px;
        border-left: none;
        border-left: 4px solid transparent;
        margin-bottom: 8px;
      }
      
      .project-card:nth-child(even) {
        background: #f8fafc;
      }
    }
    
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    /* KPIカード */
    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-bottom: 24px;
    }
    
    .kpi-card {
      background: white;
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
      border-left: 4px solid;
    }
    
    .kpi-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }
    
    .kpi-card.blue { border-left-color: #29ABE2; }
    .kpi-card.amber { border-left-color: #F59E0B; }
    .kpi-card.red { border-left-color: #EF4444; }
    .kpi-card.green { border-left-color: #10B981; }
    
    .kpi-label {
      font-size: 13px;
      color: #64748b;
      margin-bottom: 8px;
    }
    
    .kpi-value {
      font-size: 28px;
      font-weight: 700;
      color: #1e293b;
    }
    
    .kpi-icon {
      font-size: 32px;
      float: right;
      opacity: 0.3;
      margin-top: -8px;
    }
    
    /* クイックアクション */
    .section-title {
      font-size: 18px;
      font-weight: 600;
      color: #1e293b;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .quick-actions {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 24px;
    }
    
    .quick-btn {
      background: white;
      padding: 20px 12px;
      border-radius: 12px;
      border: none;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }
    
    .quick-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    }
    
    .quick-btn-icon {
      font-size: 32px;
    }
    
    .quick-btn-text {
      font-size: 13px;
      font-weight: 500;
      color: #1e293b;
    }
    
    /* 今日のルートセクション */
    .route-section {
      margin-bottom: 24px;
    }
    
    .route-map-container {
      position: relative;
      height: 280px;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      margin-bottom: 16px;
      background: white;
      /* z-indexは設定しない - Leafletのマーカーとルートを表示させる */
    }
    
    /* Leaflet地図のz-index制御（ヘッダーより下に配置） */
    .route-map-container .leaflet-control-container,
    .route-map-container .leaflet-top,
    .route-map-container .leaflet-bottom,
    .route-map-container .leaflet-control-zoom,
    .route-map-container .leaflet-control-attribution {
      z-index: 400 !important;
    }
    
    .route-map-container .leaflet-control-attribution {
      font-size: 10px;
      opacity: 0.7;
    }
    
    #route-map {
      width: 100%;
      height: 100%;
      touch-action: pan-y; /* 縦スクロールは許可、地図操作は2本指で */
    }
    
    .route-map-container:hover #route-map {
      cursor: grab;
    }
    
    .route-map-container:active #route-map {
      cursor: grabbing;
    }
    
    .map-refresh-btn {
      position: absolute;
      top: 12px;
      right: 12px;
      background: white;
      border: none;
      padding: 10px 16px;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.15);
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      color: #1B3A6B;
      display: flex;
      align-items: center;
      gap: 6px;
      z-index: 500;
      transition: background 0.2s;
    }
    
    .map-refresh-btn:hover {
      background: #f1f5f9;
    }
    
    /* スケジュールカードリスト */
    .schedule-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    
    .schedule-card {
      background: white;
      padding: 12px;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      transition: box-shadow 0.2s;
      border-left: 4px solid #29ABE2;
      position: relative;
    }
    
    .schedule-card:hover {
      box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    }
    
    .schedule-card.sortable-ghost {
      opacity: 0.5;
      cursor: grabbing;
    }
    
    .schedule-card.time-conflict {
      border-left-color: #EF4444;
      background: #fef2f2;
    }
    
    .schedule-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      cursor: pointer;
    }
    
    .schedule-header:hover {
      opacity: 0.8;
    }
    
    .drag-handle {
      font-size: 20px;
      color: #94a3b8;
      cursor: grab;
      flex-shrink: 0;
    }
    
    .schedule-number {
      background: #1B3A6B;
      color: white;
      font-size: 14px;
      font-weight: 600;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .schedule-badge {
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
    }
    
    .schedule-badge.repair {
      background: #dbeafe;
      color: #1e40af;
    }
    
    .schedule-badge.delivery {
      background: #dcfce7;
      color: #166534;
    }
    
    .schedule-badge.ongoing {
      background: #fef3c7;
      color: #92400e;
    }
    
    .schedule-badge.scheduled {
      background: #e0e7ff;
      color: #3730a3;
    }
    
    .schedule-badge.time-fixed {
      background: #fecaca;
      color: #991b1b;
      margin-left: auto;
    }
    
    .schedule-badge.time-slot {
      background: #e0e7ff;
      color: #4338ca;
      font-weight: 600;
    }
    
    .schedule-badge.time-slot.AM {
      background: #fef3c7;
      color: #92400e;
    }
    
    .schedule-badge.time-slot.PM1 {
      background: #dbeafe;
      color: #1e40af;
    }
    
    .schedule-badge.time-slot.PM2 {
      background: #e0e7ff;
      color: #4338ca;
    }
    
    .schedule-badge.time-slot.PM3 {
      background: #f3e8ff;
      color: #6b21a8;
    }
    
    .schedule-badge.time-slot {
      background: #fef3c7;
      color: #92400e;
      font-weight: 600;
      border: 1px solid #fbbf24;
    }
    
    .schedule-badge.time-slot.AM {
      background: #dbeafe;
      color: #1e40af;
      border-color: #60a5fa;
    }
    
    .schedule-badge.time-slot.PM1 {
      background: #fef3c7;
      color: #92400e;
      border-color: #fbbf24;
    }
    
    .schedule-badge.time-slot.PM2 {
      background: #fed7aa;
      color: #9a3412;
      border-color: #fb923c;
    }
    
    .schedule-badge.time-slot.PM3 {
      background: #e0e7ff;
      color: #3730a3;
      border-color: #818cf8;
    }
    
    /* 時間指定バッジ（新スタイル） */
    .time-slot-badge {
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 600;
      border: 1px solid;
    }
    
    .time-slot-badge.time-slot-am {
      background: #dbeafe;
      color: #1e40af;
      border-color: #60a5fa;
    }
    
    .time-slot-badge.time-slot-pm1 {
      background: #fef3c7;
      color: #92400e;
      border-color: #fbbf24;
    }
    
    .time-slot-badge.time-slot-pm2 {
      background: #fed7aa;
      color: #9a3412;
      border-color: #fb923c;
    }
    
    .time-slot-badge.time-slot-pm3 {
      background: #e0e7ff;
      color: #3730a3;
      border-color: #818cf8;
    }
    
    /* 時間指定アラート */
    .time-slot-warning {
      background: #fef2f2;
      border-left: 3px solid #dc2626;
      color: #991b1b;
      padding: 8px 12px;
      margin: 8px 0;
      font-size: 12px;
      border-radius: 4px;
      font-weight: 500;
    }
    
    .schedule-card.time-slot-conflict {
      border-left-color: #dc2626 !important;
    }
    
    .schedule-customer {
      font-size: 16px;
      font-weight: 600;
      color: #1e293b;
      margin-bottom: 4px;
    }
    
    .schedule-product {
      font-size: 13px;
      color: #64748b;
      margin-bottom: 12px;
    }
    
    .schedule-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 13px;
      color: #64748b;
      margin-top: 8px;
      flex-wrap: wrap;
      gap: 8px;
    }
    
    .travel-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
      color: white;
      padding: 4px 12px;
      border-radius: 16px;
      font-size: 12px;
      font-weight: 600;
      box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
    }
    
    .schedule-expand-icon {
      font-size: 18px;
      color: #94a3b8;
      transition: transform 0.3s;
      margin-left: auto;
      flex-shrink: 0;
    }
    
    .schedule-card.expanded .schedule-expand-icon {
      transform: rotate(180deg);
    }
    
    .schedule-details {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease-out;
    }
    
    .schedule-card.expanded .schedule-details {
      max-height: 1000px;
      transition: max-height 0.5s ease-in;
    }
    
    .schedule-divider {
      border: none;
      border-top: 1px dashed #e2e8f0;
      margin: 12px 0;
    }
    
    .schedule-time-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
      font-size: 14px;
    }
    
    .schedule-time-label {
      color: #64748b;
      min-width: 60px;
    }
    
    .schedule-time-value {
      font-weight: 500;
      color: #1e293b;
    }
    
    .schedule-time-input {
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 14px;
      font-weight: 500;
      width: 70px;
    }
    
    .schedule-time-input:focus {
      outline: none;
      border-color: #29ABE2;
    }
    
    /* 新しいスケジュールカードのスタイル */
    .case-number {
      color: #64748b;
      font-family: 'Courier New', monospace;
      font-weight: 600;
      font-size: 11px;
    }
    
    .customer-name {
      font-weight: 600;
      color: #1e293b;
    }
    
    .phone-link {
      color: #29ABE2;
      text-decoration: none;
      margin-left: auto;
    }
    
    .phone-link:hover {
      text-decoration: underline;
    }
    
    .schedule-product {
      font-size: 13px;
      color: #475569;
      margin-bottom: 4px;
    }
    
    .schedule-symptom {
      background: #fef3c7;
      border-left: 2px solid #f59e0b;
      padding: 4px 8px;
      margin-bottom: 4px;
      border-radius: 3px;
      font-size: 12px;
      color: #92400e;
    }
    
    .schedule-address {
      font-size: 12px;
      color: #64748b;
      margin-bottom: 4px;
    }
    
    .visit-time {
      font-size: 13px;
      color: #0c4a6e;
      font-weight: 500;
    }
    
    .schedule-detail-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
      font-size: 14px;
    }
    
    .detail-label {
      color: #64748b;
      min-width: 90px;
    }
    
    .work-time-input {
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 14px;
      font-weight: 500;
      width: 70px;
    }
    
    .work-time-input:focus {
      outline: none;
      border-color: #29ABE2;
    }
    
    /* スケジュールカードの新しいレイアウト */
    .schedule-row-1,
    .schedule-row-2,
    .schedule-row-3 {
      display: grid;
      grid-template-columns: auto auto 1fr auto;
      gap: 12px;
      align-items: center;
      font-size: 13px;
      margin-bottom: 6px;
      line-height: 1.4;
    }
    
    .schedule-row-1 {
      color: #1e293b;
      font-size: 14px;
      font-weight: 500;
    }
    
    .schedule-row-1 .case-number {
      color: #64748b;
      font-family: 'Courier New', monospace;
      font-weight: 600;
      font-size: 11px;
      grid-column: 1;
    }
    
    .schedule-row-1 .customer-name {
      font-weight: 600;
      color: #1e293b;
      grid-column: 2;
    }
    
    .schedule-row-1 .phone-link {
      color: #29ABE2;
      text-decoration: none;
      font-size: 13px;
      grid-column: 3;
      justify-self: start;
      padding-left: 20px;
    }
    
    .schedule-row-1 .phone-link:hover {
      text-decoration: underline;
    }
    
    .schedule-row-1 .address-text {
      color: #64748b;
      font-size: 13px;
      grid-column: 4;
      text-align: right;
    }
    
    .schedule-row-2 {
      color: #475569;
    }
    
    .schedule-row-2 .product-text {
      color: #1e293b;
      font-weight: 500;
      grid-column: 1 / 4;
    }
    
    .schedule-row-2 .symptom-text {
      color: #92400e;
      background: #fef3c7;
      padding: 3px 8px;
      border-radius: 4px;
      font-size: 12px;
      white-space: nowrap;
      grid-column: 4;
      justify-self: end;
    }
    
    .schedule-row-3 {
      color: #0c4a6e;
      font-weight: 500;
      align-items: center;
    }
    
    .schedule-row-3 .visit-time {
      font-size: 14px;
      color: #0c4a6e;
      font-weight: 500;
      grid-column: 1 / 3;
    }
    
    .schedule-row-3 .memo-text {
      color: #f59e0b;
      background: #fffbeb;
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 12px;
      font-weight: 500;
      grid-column: 3;
      border-left: 2px solid #f59e0b;
    }
    
    .schedule-row-3 .travel-badge {
      grid-column: 4;
      justify-self: end;
    }
    
    /* 駐車場アイコン */
    .parking-icon {
      font-size: 16px;
      margin-left: 4px;
    }
    
    .parking-icon.available {
      opacity: 1;
    }
    
    .parking-icon.unavailable {
      opacity: 0.3;
      filter: grayscale(100%);
    }
    
    .quick-time-btns {
      display: flex;
      gap: 6px;
      margin-top: 4px;
    }
    
    .quick-time-btn {
      background: #f1f5f9;
      border: none;
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 12px;
      cursor: pointer;
      transition: background 0.2s;
    }
    
    .quick-time-btn:hover {
      background: #e2e8f0;
    }
    
    .info-link-btn {
      background: white;
      border: 1px solid #e2e8f0;
      padding: 10px;
      border-radius: 8px;
      font-size: 13px;
      color: #1e293b;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-weight: 500;
    }
    
    .info-link-btn:hover {
      background: #f8fafc;
      border-color: #29ABE2;
      color: #29ABE2;
    }
    
    .schedule-address {
      font-size: 13px;
      color: #64748b;
      margin-top: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    
    .schedule-symptom {
      font-size: 13px;
      color: #dc2626;
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    
    .schedule-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
    }
    
    .action-btn {
      flex: 1;
      padding: 10px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: white;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s;
    }
    
    .action-btn:hover {
      background: #f8fafc;
      border-color: #cbd5e1;
    }
    
    .schedule-btn {
      flex: 1;
      padding: 10px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: white;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s;
    }
    
    .schedule-btn:hover {
      background: #f8fafc;
    }
    
    .schedule-btn.primary {
      background: #1B3A6B;
      color: white;
      border: none;
    }
    
    .schedule-btn.primary:hover {
      background: #152d54;
    }
    
    .conflict-warning {
      background: #fef2f2;
      border-left: 4px solid #EF4444;
      padding: 12px;
      border-radius: 8px;
      margin-top: 8px;
      font-size: 13px;
      color: #991b1b;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    /* 検索バー */
    .search-bar {
      position: relative;
      margin-bottom: 16px;
    }
    
    .search-input-wrapper {
      display: flex;
      align-items: center;
      gap: 8px;
      background: white;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 12px 16px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }
    
    .search-icon {
      font-size: 20px;
      color: #94a3b8;
    }
    
    .search-input {
      flex: 1;
      border: none;
      outline: none;
      font-size: 15px;
      font-family: 'Noto Sans JP', sans-serif;
    }
    
    .search-input::placeholder {
      color: #cbd5e1;
    }
    
    .search-spinner {
      font-size: 18px;
      animation: spin 1s linear infinite;
      color: #29ABE2;
    }
    
    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    
    .search-clear {
      font-size: 18px;
      color: #94a3b8;
      cursor: pointer;
      padding: 4px;
      border-radius: 50%;
      transition: background 0.2s;
    }
    
    .search-clear:hover {
      background: #f1f5f9;
    }
    
    .search-scan {
      font-size: 22px;
      cursor: pointer;
      padding: 4px;
      border-radius: 50%;
      transition: background 0.2s;
    }
    
    .search-scan:hover {
      background: #f1f5f9;
    }
    
    .search-result-info {
      margin-bottom: 12px;
      font-size: 13px;
      color: #64748b;
    }
    
    .search-no-result {
      background: white;
      padding: 40px;
      border-radius: 12px;
      text-align: center;
      color: #94a3b8;
    }
    
    .search-highlight {
      background: #fef08a;
      padding: 2px 4px;
      border-radius: 3px;
    }
    
    /* カテゴリフィルター */
    .category-filter {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding: 4px 0 12px;
      margin-bottom: 16px;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    
    .category-filter::-webkit-scrollbar {
      display: none;
    }
    
    .category-chip {
      flex-shrink: 0;
      padding: 8px 16px;
      border-radius: 20px;
      border: 1px solid #e2e8f0;
      background: white;
      font-size: 13px;
      font-weight: 500;
      color: #64748b;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }
    
    .category-chip:hover {
      border-color: #29ABE2;
    }
    
    .category-chip.active {
      background: #29ABE2;
      color: white;
      border-color: #29ABE2;
    }
    
    /* タブ */
    .tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
      border-bottom: 2px solid #e2e8f0;
    }
    
    .tab {
      flex: 1;
      padding: 12px;
      background: none;
      border: none;
      font-size: 14px;
      font-weight: 500;
      color: #64748b;
      cursor: pointer;
      position: relative;
      transition: color 0.2s;
    }
    
    .tab:hover {
      color: #1e293b;
    }
    
    .tab.active {
      color: #1B3A6B;
    }
    
    .tab.active::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      right: 0;
      height: 2px;
      background: #1B3A6B;
    }
    
    /* カード共通 */
    .card {
      background: white;
      padding: 16px;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      margin-bottom: 12px;
    }
    
    /* ボトムナビ */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 72px;
      background: white;
      border-top: 1px solid #e2e8f0;
      display: flex;
      justify-content: space-around;
      align-items: center;
      padding: 8px 0;
      box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
      z-index: 1000;
    }
    
    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      padding: 8px 16px;
      border-radius: 12px;
      transition: background 0.2s;
      flex: 1;
      max-width: 100px;
    }
    
    .nav-item:hover {
      background: #f8fafc;
    }
    
    .nav-item.active {
      color: #1B3A6B;
    }
    
    .nav-icon {
      font-size: 24px;
      color: #94a3b8;
      transition: color 0.2s;
    }
    
    .nav-item.active .nav-icon {
      color: #1B3A6B;
    }
    
    .nav-label {
      font-size: 11px;
      font-weight: 500;
      color: #64748b;
    }
    
    .nav-item.active .nav-label {
      color: #1B3A6B;
      font-weight: 600;
    }
    
    /* FAB */
    .fab {
      position: fixed;
      bottom: 88px;
      right: 20px;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: linear-gradient(135deg, #29ABE2, #1B3A6B);
      color: white;
      border: none;
      font-size: 28px;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(27, 58, 107, 0.4);
      z-index: 999;
      transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .fab:hover {
      transform: scale(1.05);
      box-shadow: 0 6px 16px rgba(27, 58, 107, 0.5);
    }
    
    .fab.active {
      transform: rotate(45deg);
    }
    
    /* FABメニュー（円形配置：左から反時計回りに90度） */
    .fab-menu {
      position: fixed;
      bottom: 88px;
      right: 20px;
      width: 56px;
      height: 56px;
      pointer-events: none;
      z-index: 998;
    }
    
    .fab-menu.show .fab-menu-item {
      opacity: 1;
      pointer-events: auto;
    }
    
    /* 円形アイコンボタン */
    .fab-menu-item {
      position: absolute;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      font-size: 24px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      opacity: 0;
      pointer-events: none;
      right: 4px;
      bottom: 4px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
    
    /* カラーバリエーション */
    .fab-menu-item.project {
      background: linear-gradient(135deg, #dbeafe, #bfdbfe);
      color: #1e40af;
    }
    
    .fab-menu-item.product {
      background: linear-gradient(135deg, #fef3c7, #fde68a);
      color: #92400e;
    }
    
    .fab-menu-item.customer {
      background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
      color: #6b21a8;
    }
    
    /* 各ボタンの位置（FAB中心から半径140pxの円形配置、3項目を90度間隔で配置） */
    .fab-menu.show .fab-menu-item:nth-child(1) {
      transform: translate(-140px, 4px);
      transition-delay: 0.05s;
    }
    
    .fab-menu-item:nth-child(1):hover {
      transform: translate(-140px, 4px) scale(1.2);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }
    
    .fab-menu.show .fab-menu-item:nth-child(2) {
      transform: translate(-99px, -99px);
      transition-delay: 0.1s;
    }
    
    .fab-menu-item:nth-child(2):hover {
      transform: translate(-99px, -99px) scale(1.2);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }
    
    .fab-menu.show .fab-menu-item:nth-child(3) {
      transform: translate(-4px, -140px);
      transition-delay: 0.15s;
    }
    
    .fab-menu-item:nth-child(3):hover {
      transform: translate(-4px, -140px) scale(1.2);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }
    
    /* ツールチップ（ホバー時のラベル表示） */
    .fab-menu-label {
      position: absolute;
      right: 56px;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0, 0, 0, 0.85);
      color: white;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 500;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s;
      z-index: 1;
    }
    
    .fab-menu-item:hover .fab-menu-label {
      opacity: 1;
    }
    
    /* ツールチップの矢印 */
    .fab-menu-label::after {
      content: '';
      position: absolute;
      right: -4px;
      top: 50%;
      transform: translateY(-50%);
      width: 0;
      height: 0;
      border-left: 4px solid rgba(0, 0, 0, 0.85);
      border-top: 4px solid transparent;
      border-bottom: 4px solid transparent;
    }
    
    /* トースト通知 */
    .toast {
      position: fixed;
      top: 80px;
      left: 50%;
      transform: translateX(-50%) translateY(-100px);
      background: white;
      padding: 14px 20px;
      border-radius: 12px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      z-index: 2000;
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 280px;
      max-width: 90%;
      opacity: 0;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .toast.show {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }
    
    .toast.success {
      border-left: 4px solid #10B981;
    }
    
    .toast.warning {
      border-left: 4px solid #F59E0B;
    }
    
    .toast.error {
      border-left: 4px solid #EF4444;
    }
    
    .toast-icon {
      font-size: 24px;
    }
    
    .toast.success .toast-icon {
      color: #10B981;
    }
    
    .toast.warning .toast-icon {
      color: #F59E0B;
    }
    
    .toast.error .toast-icon {
      color: #EF4444;
    }
    
    .toast-message {
      flex: 1;
      font-size: 14px;
      font-weight: 500;
      color: #1e293b;
    }
    
    /* モーダル */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 1500;
      animation: fadeIn 0.2s;
    }
    
    .modal-overlay.show {
      display: block;
    }
    
    .modal {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: white;
      border-radius: 16px;
      max-width: 90%;
      max-height: 85vh;
      overflow-y: auto;
      box-shadow: 0 8px 24px rgba(0,0,0,0.2);
      z-index: 1501;
      animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes slideUp {
      from { transform: translate(-50%, -40%); opacity: 0; }
      to { transform: translate(-50%, -50%); opacity: 1; }
    }
    
    .modal-header {
      padding: 20px;
      border-bottom: 1px solid #e2e8f0;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .modal-title {
      font-size: 18px;
      font-weight: 600;
      color: #1e293b;
    }
    
    .modal-close {
      font-size: 24px;
      color: #94a3b8;
      cursor: pointer;
      padding: 4px;
      border-radius: 50%;
      transition: background 0.2s;
    }
    
    .modal-close:hover {
      background: #f1f5f9;
    }
    
    .modal-body {
      padding: 20px;
    }
    
    .modal-footer {
      padding: 16px 20px;
      border-top: 1px solid #e2e8f0;
      display: flex;
      gap: 12px;
      justify-content: flex-end;
    }
    
    /* サインパッド */
    .signature-pad {
      touch-action: none;
      user-select: none;
    }
    
    /* フォーム */
    .form-group {
      margin-bottom: 20px;
    }
    
    .form-label {
      display: block;
      font-size: 14px;
      font-weight: 500;
      color: #1e293b;
      margin-bottom: 8px;
    }
    
    .form-input {
      width: 100%;
      padding: 12px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      font-size: 15px;
      font-family: 'Noto Sans JP', sans-serif;
      transition: border-color 0.2s;
    }
    
    .form-input:focus {
      outline: none;
      border-color: #29ABE2;
    }
    
    .form-textarea {
      resize: vertical;
      min-height: 80px;
    }
    
    /* ボタン */
    .btn {
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'Noto Sans JP', sans-serif;
    }
    
    .btn-primary {
      background: #1B3A6B;
      color: white;
    }
    
    .btn-primary:hover {
      background: #152d54;
    }
    
    .btn-secondary {
      background: #e2e8f0;
      color: #1e293b;
    }
    
    .btn-secondary:hover {
      background: #cbd5e1;
    }
    
    /* 外部マップアプリメニュー */
    .map-app-menu-item {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 12px 16px;
      border: none;
      background: white;
      text-align: left;
      font-size: 14px;
      color: #1e293b;
      cursor: pointer;
      transition: background 0.2s;
    }
    
    .map-app-menu-item:first-child {
      border-radius: 8px 8px 0 0;
    }
    
    .map-app-menu-item:last-child {
      border-radius: 0 0 8px 8px;
    }
    
    .map-app-menu-item:hover {
      background: #f1f5f9;
    }
    
    .map-app-menu-item:active {
      background: #e2e8f0;
    }
    
    .btn-danger {
      background: #EF4444;
      color: white;
    }
    
    .btn-danger:hover {
      background: #dc2626;
    }
    
    /* スキャナーモーダル */
    .scanner-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.95);
      z-index: 2000;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    
    .scanner-modal.show {
      display: flex;
    }
    
    .scanner-video-wrapper {
      position: relative;
      width: 100%;
      max-width: 500px;
      aspect-ratio: 1;
    }
    
    .scanner-video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 16px;
    }
    
    .scanner-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 250px;
      height: 250px;
      border: 2px solid rgba(41, 171, 226, 0.8);
      border-radius: 12px;
      box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    }
    
    .scanner-corner {
      position: absolute;
      width: 24px;
      height: 24px;
      border: 3px solid #29ABE2;
    }
    
    .scanner-corner.tl {
      top: -2px;
      left: -2px;
      border-right: none;
      border-bottom: none;
      border-radius: 12px 0 0 0;
    }
    
    .scanner-corner.tr {
      top: -2px;
      right: -2px;
      border-left: none;
      border-bottom: none;
      border-radius: 0 12px 0 0;
    }
    
    .scanner-corner.bl {
      bottom: -2px;
      left: -2px;
      border-right: none;
      border-top: none;
      border-radius: 0 0 0 12px;
    }
    
    .scanner-corner.br {
      bottom: -2px;
      right: -2px;
      border-left: none;
      border-top: none;
      border-radius: 0 0 12px 0;
    }
    
    .scanner-controls {
      margin-top: 24px;
      display: flex;
      gap: 12px;
    }
    
    .scanner-btn {
      padding: 14px 28px;
      border: none;
      border-radius: 12px;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .scanner-btn-cancel {
      background: #475569;
      color: white;
    }
    
    .scanner-btn-cancel:hover {
      background: #334155;
    }
    
    .scanner-btn-manual {
      background: white;
      color: #1e293b;
    }
    
    .scanner-btn-manual:hover {
      background: #f1f5f9;
    }
    
    .scanner-canvas {
      display: none;
    }
    
    /* レスポンシブ調整 */
    @media (max-width: 600px) {
      .kpi-grid {
        gap: 8px;
      }
      
      .kpi-card {
        padding: 16px;
      }
      
      .kpi-value {
        font-size: 24px;
      }
      
      .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
      }
      
      .quick-btn {
        padding: 16px 8px;
      }
      
      .quick-btn-icon {
        font-size: 28px;
      }
      
      .quick-btn-text {
        font-size: 12px;
      }
    }
    
    /* スケジュールカード拡張スタイル */
    .schedule-info {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    
    .schedule-type {
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
    }
    
    .schedule-type.type-repair {
      background: #dbeafe;
      color: #1e40af;
    }
    
    .schedule-type.type-sale {
      background: #dcfce7;
      color: #166534;
    }
    
    .status-badge {
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
      color: white;
    }
    
    .schedule-time {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
      flex-wrap: wrap;
    }
    
    .visit-time {
      font-size: 13px;
      color: #475569;
      font-weight: 500;
    }
    
    .travel-badge {
      background: #f59e0b;
      color: white;
      padding: 3px 8px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
    }
    
    .schedule-body {
      padding: 8px 0;
      border-top: 1px solid #f1f5f9;
      border-bottom: 1px solid #f1f5f9;
      margin: 8px 0;
    }
    
    .customer-name,
    .product-info,
    .symptom-info,
    .location-info,
    .estimate-amount {
      font-size: 13px;
      color: #475569;
      margin-bottom: 6px;
      line-height: 1.5;
    }
    
    .estimate-amount {
      font-weight: 600;
      color: #059669;
      margin-top: 8px;
    }
    
    .schedule-footer {
      display: flex;
      gap: 8px;
      margin-top: 8px;
    }
    
    .btn-detail,
    .btn-workflow {
      flex: 1;
      padding: 8px 12px;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .btn-detail {
      background: #f1f5f9;
      color: #475569;
    }
    
    .btn-detail:hover {
      background: #e2e8f0;
    }
    
    .btn-workflow {
      background: #3B82F6;
      color: white;
    }
    
    .btn-workflow:hover {
      background: #2563EB;
    }
    
    .empty-state {
      text-align: center;
      padding: 40px 20px;
      color: #94a3b8;
      font-size: 15px;
    }
    
    /* 顧客カード */
    .customer-card {
      background: white;
      padding: 16px;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      margin-bottom: 12px;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .customer-card:hover {
      box-shadow: 0 4px 12px rgba(0,0,0,0.12);
      transform: translateY(-2px);
    }
    
    .customer-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }
    
    .customer-card-name {
      font-weight: 600;
      font-size: 16px;
      color: #1B3A6B;
    }
    
    .customer-card-info {
      font-size: 13px;
      color: #64748b;
      line-height: 1.6;
    }
    
    .customer-card-info div {
      margin-bottom: 4px;
    }
    
    /* フォームセクションタイトル */
    .form-section-title {
      font-size: 15px;
      font-weight: 600;
      color: #1B3A6B;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 2px solid #e2e8f0;
    }
    
    /* ============================================
       案件一覧ページ - レスポンシブデザイン
       ============================================ */
    
    /* 案件ページ固定レイアウト */
    .projects-page.active {
      position: fixed !important;
      top: 0;
      left: 0;
      right: 0;
      bottom: 60px;
      z-index: 10;
      background: #f5f7fa;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    
    /* ヘッダー（固定エリア） */
    .projects-header {
      flex-shrink: 0;
      background: white;
      padding: 12px 16px;
      border-bottom: 2px solid #e2e8f0;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    /* タイトル行 */
    .projects-title-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    
    .projects-title {
      font-size: 17px;
      font-weight: 700;
      color: #1B3A6B;
    }
    
    .projects-count {
      font-size: 14px;
      font-weight: 400;
      color: #64748b;
    }
    
    /* 日付フィルターバー */
    .projects-date-bar {
      display: flex;
      gap: 6px;
      margin-bottom: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    
    .projects-date-bar::-webkit-scrollbar {
      display: none;
    }
    
    .date-quick-btn {
      flex-shrink: 0;
      padding: 6px 12px;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      background: white;
      color: #475569;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .date-quick-btn.active {
      background: #3B82F6;
      color: white;
      border-color: #3B82F6;
    }
    
    .date-quick-btn:hover {
      background: #f8fafc;
      border-color: #cbd5e1;
    }
    
    .date-quick-btn.active:hover {
      background: #2563EB;
    }
    
    .calendar-icon-btn {
      flex-shrink: 0;
      padding: 6px 10px;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      background: white;
      font-size: 16px;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .calendar-icon-btn:hover {
      background: #f8fafc;
    }
    
    /* 日付選択エリア */
    .date-picker-section {
      display: none;
      gap: 8px;
      margin-bottom: 10px;
      padding: 10px;
      background: #f8fafc;
      border-radius: 8px;
      border: 1px solid #e2e8f0;
    }
    
    .date-picker-section input[type="date"] {
      flex: 1;
      padding: 8px 12px;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      font-size: 13px;
      background: white;
    }
    
    .clear-date-btn {
      padding: 8px 12px;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      background: white;
      color: #64748b;
      font-size: 13px;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .clear-date-btn:hover {
      background: #fee2e2;
      color: #dc2626;
      border-color: #fca5a5;
    }
    
    /* 検索バー */
    .projects-search-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      background: white;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      margin-bottom: 10px;
      transition: all 0.2s;
    }
    
    .projects-search-bar:focus-within {
      border-color: #3B82F6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    .projects-search-input {
      flex: 1;
      border: none;
      outline: none;
      font-size: 14px;
      font-family: 'Noto Sans JP', sans-serif;
      background: transparent;
    }
    
    .projects-search-input::placeholder {
      color: #cbd5e1;
    }
    
    /* 案件種別トグル */
    .projects-type-toggle {
      display: flex;
      gap: 6px;
      margin-bottom: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    
    .projects-type-toggle::-webkit-scrollbar {
      display: none;
    }
    
    .type-toggle-btn {
      flex-shrink: 0;
      padding: 8px 14px;
      border: 2px solid #e2e8f0;
      border-radius: 8px;
      background: white;
      color: #475569;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    
    .type-toggle-btn.active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border-color: transparent;
    }
    
    .type-toggle-btn[data-type="repair"].active {
      background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    }
    
    .type-toggle-btn[data-type="delivery"].active {
      background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    }
    
    .type-toggle-btn:hover {
      border-color: #cbd5e1;
      background: #f8fafc;
    }
    
    .type-toggle-btn.active:hover {
      opacity: 0.9;
    }
    
    .type-count {
      display: inline-block;
      min-width: 20px;
      padding: 2px 6px;
      background: rgba(255,255,255,0.3);
      border-radius: 10px;
      font-size: 11px;
      font-weight: 700;
      text-align: center;
    }
    
    .type-toggle-btn.active .type-count {
      background: rgba(255,255,255,0.25);
    }
    
    /* ステータスタブ */
    .projects-status-tabs {
      display: flex;
      gap: 6px;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
      padding-bottom: 2px;
    }
    
    .projects-status-tabs::-webkit-scrollbar {
      display: none;
    }
    
    .status-tab {
      flex-shrink: 0;
      padding: 6px 12px;
      border: 1px solid #e2e8f0;
      border-radius: 16px;
      background: white;
      color: #64748b;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .status-tab.active {
      background: #3B82F6;
      color: white;
      border-color: #3B82F6;
    }
    
    .status-tab:hover {
      background: #f1f5f9;
    }
    
    .status-tab.active:hover {
      background: #2563EB;
    }
    
    /* リストコンテナ（スクロール可能） */
    .projects-list-container {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }
    
    .projects-list {
      padding: 12px 16px;
    }
    
    /* ローディング表示 */
    .projects-loading {
      text-align: center;
      padding: 20px;
      color: #64748b;
      font-size: 14px;
    }
    
    .projects-loading .spinner {
      width: 30px;
      height: 30px;
      border: 3px solid #e2e8f0;
      border-top-color: #3B82F6;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto 12px;
    }
    
    /* 結果なし表示 */
    .projects-no-result {
      background: white;
      padding: 40px 20px;
      border-radius: 12px;
      text-align: center;
      color: #94a3b8;
      margin: 20px;
    }
    
    /* ============================================
       案件カード - レスポンシブデザイン
       ============================================ */
    
    /* 基本カードスタイル */
    .project-card {
      background: white;
      border-radius: 12px;
      padding: 14px;
      margin-bottom: 10px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      cursor: pointer;
      transition: all 0.2s;
      position: relative;
    }
    
    .project-card:hover {
      box-shadow: 0 4px 12px rgba(0,0,0,0.12);
      transform: translateY(-2px);
    }
    
    /* 修理カード（青） */
    .project-card.repair {
      border-left: 4px solid #3B82F6;
      background: linear-gradient(90deg, #EFF6FF 0%, white 30px);
    }
    
    /* 販売カード（オレンジ） */
    .project-card.delivery {
      border-left: 4px solid #F59E0B;
      background: linear-gradient(90deg, #FEF3C7 0%, white 30px);
    }
    
    /* カードヘッダー */
    .project-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 10px;
    }
    
    .project-card-left {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
    }
    
    .project-type-icon {
      font-size: 20px;
      flex-shrink: 0;
    }
    
    .project-customer-name {
      font-size: 15px;
      font-weight: 600;
      color: #1B3A6B;
      flex: 1;
    }
    
    .project-status-badge {
      flex-shrink: 0;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
    }
    
    .project-status-badge.received {
      background: #dbeafe;
      color: #1e40af;
    }
    
    .project-status-badge.scheduled,
    .project-status-badge.visiting {
      background: #fef3c7;
      color: #92400e;
    }
    
    .project-status-badge.in_progress,
    .project-status-badge.ongoing {
      background: #fce7f3;
      color: #9f1239;
    }
    
    .project-status-badge.completed {
      background: #d1fae5;
      color: #065f46;
    }
    
    .project-status-badge.pending_completion {
      background: #fed7aa;
      color: #9a3412;
    }
    
    /* カード本体 */
    .project-card-body {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 13px;
      color: #475569;
    }
    
    .project-product-line {
      display: flex;
      align-items: center;
      gap: 6px;
      font-weight: 500;
      color: #1e293b;
    }
    
    .project-product-icon {
      font-size: 14px;
    }
    
    .project-info-line {
      display: flex;
      align-items: center;
      gap: 6px;
      color: #64748b;
    }
    
    .project-info-icon {
      font-size: 12px;
      width: 16px;
      text-align: center;
      flex-shrink: 0;
    }
    
    /* ============================================
       レスポンシブ対応
       ============================================ */
    
    /* iPhone（縦向き: ~428px） */
    @media (max-width: 428px) {
      .projects-header {
        padding: 10px 12px;
      }
      
      .projects-title {
        font-size: 16px;
      }
      
      .projects-list {
        padding: 10px 12px;
      }
      
      .project-card {
        padding: 12px;
        margin-bottom: 8px;
      }
      
      .project-customer-name {
        font-size: 14px;
      }
      
      .project-card-body {
        font-size: 12px;
      }
    }
    
    /* iPad（縦向き: 768px~1024px） */
    @media (min-width: 768px) and (max-width: 1024px) {
      .projects-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }
      
      .project-card {
        margin-bottom: 0;
      }
    }
    
    /* PC（1025px~） */
    @media (min-width: 1025px) {
      .projects-page.active {
        display: flex;
        flex-direction: row;
        bottom: 0;
      }
      
      /* 左サイドバー */
      .projects-sidebar {
        width: 280px;
        flex-shrink: 0;
        background: white;
        border-right: 2px solid #e2e8f0;
        padding: 20px;
        overflow-y: auto;
      }
      
      .projects-header {
        flex-direction: row;
        align-items: flex-start;
        padding: 16px 20px;
      }
      
      .projects-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      
      .projects-list {
        display: block;
        padding: 16px 20px;
      }
      
      .project-card {
        padding: 16px;
        margin-bottom: 12px;
      }
    }
    
    /* 印刷用スタイル */
    @media print {
      .header,
      .bottom-nav,
      .fab,
      .map-refresh-btn,
      .search-bar,
      .category-filter,
      .tabs,
      .schedule-btn,
      .nav-item {
        display: none !important;
      }
      
      .main-content {
        margin-top: 0;
        padding: 20px;
      }
      
      .schedule-card {
        page-break-inside: avoid;
      }
    }
  </style>