/* B-management 統一CSS */

/* 和カラー変数定義 */
:root {
    --unit-color: #F4A583;
    --unit-color-light: #F7B8A0;
    --unit-color-dark: #E8946A;
    --unit-color-accent: #F2C4A3;
    --unit-color-bg: #FEFCFA;
    --unit-color-border: #F8D4C0;
    --unit-color-text: #2D2D2D;
    --unit-color-text-light: #666666;
    --unit-color-success: #28A745;
    --unit-color-warning: #FFC107;
    --unit-color-danger: #DC3545;
    --unit-color-info: #17A2B8;
}

/* 基本レイアウト */
.b-management-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* セクションカード */
.b-management-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid var(--unit-color-border);
    background: linear-gradient(135deg, #ffffff 0%, var(--unit-color-bg) 100%);
}

.b-management-section h3 {
    margin: 0 0 25px 0;
    color: var(--unit-color);
    font-size: 1.4em;
    font-weight: 600;
    border-bottom: 2px solid var(--unit-color);
    padding-bottom: 10px;
}

/* フォームグリッド */
.b-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.b-management-grid-compact {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

/* フォームグループ */
.b-management-form-group {
    position: relative;
}

.b-management-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--unit-color-text);
    font-size: 0.95em;
}

.b-management-form-group label.required::after {
    content: " *";
    color: var(--unit-color-danger);
    font-weight: bold;
}

.b-management-form-group input,
.b-management-form-group select,
.b-management-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--unit-color-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--unit-color-bg);
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 数値入力フィールドのスピンボタンを非表示 */
.b-management-form-group input[type="number"]::-webkit-outer-spin-button,
.b-management-form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.b-management-form-group input[type="number"] {
    -moz-appearance: textfield;
}

/* select要素のデフォルトスタイルを無効化 */
.b-management-form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.b-management-form-group select::-ms-expand {
    display: none;
}

.b-management-form-group input:focus,
.b-management-form-group select:focus,
.b-management-form-group textarea:focus {
    outline: none;
    border-color: var(--unit-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(244, 165, 131, 0.1);
}

.b-management-form-group input::placeholder,
.b-management-form-group textarea::placeholder {
    color: var(--unit-color-text-light);
    font-style: italic;
}

/* ヘルプテキスト */
.b-management-help-text {
    color: var(--unit-color-text-light);
    font-size: 0.85em;
    margin-top: 6px;
    line-height: 1.4;
}

/* ボタンコンテナ */
.b-management-button-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* プライマリボタン */
.b-management-btn-primary {
    background: var(--unit-color);
    color: white;
    padding: 7px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(244, 165, 131, 0.2);
    text-decoration: none;
}


/* ボタングループ */
.b-management-btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.b-management-btn-primary:hover {
    background: var(--unit-color-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(244, 165, 131, 0.3);
}

.b-management-btn-primary:active {
    transform: translateY(0);
}

/* セカンダリボタン */
.b-management-btn-secondary {
    background: var(--unit-color-light);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.b-management-btn-secondary:hover {
    background: var(--unit-color-dark);
}

/* アクションボタングループ */
.b-management-btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-clear{
    width: 100px;
}
.b-management-btn-group .b-management-btn-secondary {
    margin: 0;
}

/* ラベルバッジ */
.b-management-label-badge {
    background: var(--unit-color);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* アラートメッセージ */
.b-management-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid;
    font-weight: 500;
}

.b-management-alert-success {
    background: linear-gradient(135deg, #FEF7F3 0%, #F8E8E0 100%);
    border-color: var(--unit-color-accent);
    color: var(--unit-color-dark);
}

.b-management-alert-error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border-color: var(--unit-color-danger);
    color: #991B1B;
}

.b-management-alert-warning {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-color: var(--unit-color-warning);
    color: #92400E;
}

.b-management-alert-info {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: var(--unit-color-info);
    color: #1E40AF;
}

/* モーダルスタイル */
.b-management-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.b-management-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.b-management-modal h3 {
    margin: 0 0 20px 0;
    color: var(--unit-color);
}

/* モーダル閉じるボタン */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--unit-color);
}

/* テーブルスタイル */
.b-management-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.b-management-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    background: #f8f9fa;
    font-weight: 600;
    color: var(--unit-color-text);
}

.b-management-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.b-management-table tbody tr:hover {
    background: var(--unit-color-bg);
}

/* 統計カード */
.b-management-stat-card {
    background: linear-gradient(135deg, var(--unit-color-bg) 0%, #ffffff 100%);
    border: 1px solid var(--unit-color-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin:10px 0 10px 0;
}

.b-management-stat-card h4 {
    color: var(--unit-color);
    margin-bottom: 10px;
}

/* テーブルコンテナ */
.b-management-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--unit-color-border);
    border-radius: 8px;
    padding: 10px;
    background: white;
}

/* テーブル行 */
.b-management-table-row {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.b-management-table-cell {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

/* 配信先情報 */
.recipient-info {
    flex: 1;
    margin-left: 10px;
}

.recipient-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.recipient-email {
    font-size: 12px;
    color: #666;
}

.recipient-status {
    font-size: 11px;
    color: #999;
}

.recipient-labels {
    margin-top: 4px;
}

/* ラベルコンテナ */
.b-management-label-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 100px;
    overflow-y: auto;
}

.b-management-label-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-right: 8px;
}

.b-management-label-item input {
    margin-right: 4px;
}

/* プレビュー */
.b-management-preview {
    border: 1px solid var(--unit-color-border);
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
    min-height: 150px;
    white-space: pre-wrap;
    font-size: 14px;
}

/* 空状態 */
.b-management-empty-state {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* ステータスバッジ */
.b-management-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
}

.b-management-status-draft {
    background-color: #6c757d;
    color: white;
}

.b-management-status-scheduled {
    background-color: #17a2b8;
    color: white;
}

.b-management-status-sent {
    background-color: #28a745;
    color: white;
}

.b-management-status-partial {
    background-color: #ffc107;
    color: #212529;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .b-management-container {
        padding: 10px;
    }
    
    .b-management-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .b-management-grid,
    .b-management-grid-compact {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .b-management-btn-group {
        flex-direction: column;
    }
    
    .b-management-btn-group .b-management-btn-secondary {
        margin-bottom: 8px;
    }
    
    .b-management-section h3 {
        font-size: 1.2em;
    }
    
    /* ラベルモーダルのレスポンシブ対応 */
    .label-modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
        padding: 15px;
    }
    
    .label-modal-item {
        padding: 0;
        min-height: auto;
    }
    
    .label-modal-badge {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .label-modal-checkbox {
        width: 10px;
        height: 10px;
        top: 1px;
        right: 1px;
    }
    
    .b-management-modal-content {
        max-width: 95%;
        width: 95%;
        padding: 20px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b-management-section {
    animation: fadeIn 0.3s ease-out;
}

/* フォーカス時のアニメーション */
.b-management-form-group input:focus,
.b-management-form-group select:focus,
.b-management-form-group textarea:focus {
    animation: pulse 0.3s ease-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 165, 131, 0.4);
    }
    70% {
        box-shadow: 0 0 0 3px rgba(244, 165, 131, 0.1);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(244, 165, 131, 0.1);
    }
} 

/* ラベルフィルタモーダル */
.label-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--unit-color);
    padding-bottom: 10px;
    flex-shrink: 0;
}

.label-modal-title {
    margin: 0;
    color: var(--unit-color);
    font-size: 1.3em;
}

.label-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.label-modal-close:hover {
    color: var(--unit-color);
}

.label-modal-description {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.label-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 20px;
    flex: 1;
    min-height: 0;
}

.label-modal-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    min-height: auto;
    position: relative;
}

.label-modal-item:hover {
    transform: translateY(-1px);
}

/* 選択されたラベルのスタイル */
.label-modal-item input:checked + .label-modal-content .label-modal-badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

/* 動的なホバー色のためのCSS */
.label-modal-item[data-hover-color] {
    transition: transform 0.2s ease;
}

.label-modal-checkbox {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    margin: 0;
    z-index: 1;
}

.label-modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.label-modal-badge {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    color: white;
    border-radius: 20px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.label-modal-badge-all {
    background-color: var(--unit-color);
}

.label-modal-text {
    display: none;
}

.label-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
}

.label-modal-btn {
    padding: 8px 20px;
    font-size: 14px;
} 
p.c_message {
    margin: 18px;
}

  
  .search-results {
    margin-top: 10px;
    color: #666;
  }
  /* h２設定*/
  .unit_main h2 {
    font-size: 20px;
    font-weight: bold;
    border-left: 5px solid var(--unit-color);
    padding-left: 12px;
    margin: 0 0 10px;
    color: #333;
}



.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #000;
}

.btn {
  background-color: #007bff;
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn:hover {
  background-color: #0056b3;
}


  

@media (max-width: 768px) {
    .desktop-view {
      display: none !important;
    }
    
    .mobile-view {
      display: block !important;
    }
    


    /* デスクトップの新規追加ボタンはモバイルでは非表示 */
  
  /* モバイルではデスクトップ用ボタンを非表示 */
    
  
    
    .network-card {
      margin-bottom: 10px;
      padding: 12px;
    }
    
    .info-row {
      margin-bottom: 6px;
    }
    
    .label {
      min-width: 70px !important;
      font-size: 13px;
    }
    
    .value {
      font-size: 13px;
    }
  }
  
  /* テーブルのレスポンシブ対応 */
  @media (max-width: 1024px) {
    .network-table {
      font-size: 12px;
    }
    
    .network-table th,
    .network-table td {
      padding: 4px 6px;
    }
  }
  
  /* ファイル選択ボタンのモバイル最適化 */
  @media (max-width: 768px) {
    input[type="file"] {
      font-size: 18px !important;
      padding: 15px !important;
      min-height: 60px !important;
    }
    
    /* ファイル選択ボタンのテキストを大きく */
    input[type="file"]::file-selector-button {
      font-size: 16px;
      padding: 10px 15px;
      margin-right: 10px;
    }
  } 

  /* ユニット系レイアウト */
main.unit_main {
    margin-top: 27px; 
  }
  
  
  
  .unit_main p {
    font-size: 14px;
    line-height: 1.7;
    margin: 10px 0 20px;
    color: #444;
  }
  
  
  /* 署名状況の表示スタイル */
  .signed-complete {
    color: #28a745;
    font-weight: bold;
  }
  
  .signed-pending {
    color: #dc3545;
    font-weight: bold;
  }
  
  /* デバッグ情報 */
  .debug-info {
    font-size: 0.8em;
    color: gray;
  }
  
  
  /* セカンダリボタン */
  .btn-secondary {
    background-color: #6c757d;
    color: white;
  }
  
  /* 検索セクション（ゲスト用） */
  
  
  
  
  /* ユニットモバイルカード */
  .unit-mobile-cards {
    display: none;
  }
  
  .tab-button.active {
    background-color: #fff;
    color: #333;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
  }
  .tab-button {
    padding: 12px 24px;
    margin-right: 5px;
    border: 2px solid #e0e0e0;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #666;
    font-size: 14px;
  }
  
  .tab-content {
    border: 2px solid #e0e0e0;
    border-top: none;
    padding: 10px;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .unit-mobile-cards .unit-member-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .unit-mobile-cards .unit-member-card.highlighted {
    background-color: #e8f4fd;
    border: 2px solid #4a90e2;
  }
  
  .unit-mobile-cards .unit-member-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .unit-mobile-cards .unit-member-card-photo {
    margin-right: 15px;
  }
  
  .unit-mobile-cards .unit-member-card-photo img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
  }
  
  .unit-mobile-cards .unit-member-card-photo-placeholder {
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    border: 2px solid #ddd;
  }
  
  .unit-mobile-cards .unit-member-card-info {
    flex: 1;
  }
  
  .unit-mobile-cards .unit-member-card-name {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
  }
  
  .unit-mobile-cards .unit-member-card-id {
    margin: 0;
    color: #666;
    font-size: 14px;
  }
  
  .unit-mobile-cards .unit-member-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
  }
  
  .unit-mobile-cards .unit-member-card-application {
    margin-bottom: 15px;
  }
  
  .unit-mobile-cards .unit-member-card-application-status {
    font-size: 12px;
  }
  
  .unit-mobile-cards .unit-member-card-application-status.not-submitted {
    color: #999;
  }
  
  .unit-mobile-cards .unit-member-card-application-status.submitted {
    color: #f39c12;
  }
  
  .unit-mobile-cards .unit-member-card-application-status.approved {
    color: #27ae60;
  }
  
  .unit-mobile-cards .unit-member-card-application-status.rejected {
    color: #e74c3c;
  }
  
  .unit-mobile-cards .unit-member-card-application-time {
    color: #666;
    font-size: 11px;
  }
  
  .unit-mobile-cards .unit-member-card-application-link {
    font-size: 12px;
    padding: 4px 8px;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
  }
  
  .unit-mobile-cards .unit-member-card-actions {
    display: flex;
    gap: 10px;
  }
  
  .unit-mobile-cards .unit-member-card-actions .btn {
    flex: 1;
    text-align: center;
    padding: 8px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
  }
  
  
  
  /* デスクトップ表示時の設定 */
  .unit-mobile-cards {
    display: none;
  }
  
  .mobile-only {
    display: none;
  }
  
  /* モバイル表示時のカード表示 */
  @media (max-width: 768px) {
    .unit-mobile-cards {
      display: block;
    }
    
    .mobile-only {
      display: block;
    }
    
    /* デスクトップテーブルを非表示 */
    .desktop-table {
      display: none;
    }
  }
  
  /* メニューリンクの統一スタイル */
  .menu-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
  }
  
  .header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  
  
  .modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  .modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .modal-content {
    background: #fff;
    border-radius: 8px;
    box-sizing: border-box;
    position: relative;
    padding: 20px 20px 95px 20px; /* 下部に40pxの余白を追加 */
    width: 70%;
    max-width: 600px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  #member-search-results {
    overflow-y: visible;
    max-height: none;
    margin-bottom: 10px;
    min-height: 50px;
  }
      .search-result {
        cursor: pointer;
        padding: 4px;
      }
  
      #member-search-results {
    overflow-y: visible;
    max-height: none;
  }
  .edit-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
  }
  /* 検索結果表示用スタイル */
  .member-search-results-active {
    background: #fff;
    min-height: 50px;
  }
  
  section.unit-flex-group {
      display: flex;
      gap: 20px;
  }
  
  .unit-flex-group{
    display: flex; flex-direction: row; gap: 24px; align-items: stretch;
  }
  .unit-flex-left{
  flex: 2;
  }
  .unit-flex-right{
  flex: 1;
  }
  .flex_box{
   flex: 1; height: 100%; 
   background: white; 
   padding: 24px; 
   border-radius: 8px; 
   box-shadow: 0 0 4px rgba(0,0,0,0.1);
   margin: 20px 0 20px 0;
  }
  .flex_box{
   flex: 1; height: 100%; 
   background: white; 
   padding: 24px; 
   border-radius: 8px; 
   box-shadow: 0 0 4px rgba(0,0,0,0.1);
   margin: 20px 0 20px 0;
  }
  
  
  /* 新規ユーティリティクラス */
  .id-label {
    font-size: 14px;
    color: #666;
  }
  
  .form-row {
    display: flex;
    gap: 12px;
  }
  
  .form-col {
    flex: 1;
  }
  
  .form-fieldset {
    margin-bottom: 12px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
  }
  
  .team-checkbox {
    display: inline-block;
    margin-right: 10px;
    font-weight: normal;
  }
  
  .photo-preview {
    margin-top: 10px;
  }
  
  .photo-image {
    max-width: 120px;
    border-radius: 4px;
  }
  
  .submit-btn {
    margin-bottom: 40px;
  }
        /* Responsive styles for detail rows */
        #details-list {
          width: 100%;
          margin-bottom: 8px;
        }
        .detail-row {
          display: block;
          margin-bottom: 12px;
        }
  
        .detail-item-name-select {
          width: 100%;
        }
  
        .detail-line {
          display: flex;
          gap: 8px;
          align-items: center;
          margin-top: 4px;
        }
  
        .detail-line label {
          display: flex;
          flex-direction: column;
        }
  
        .detail-line input[type="number"] {
          width: 80px;
        }
  
        .detail-line input.quantity {
          width: 80px;
        }
  
        .detail-line input.unit {
          width: 80px!important;
          margin-top: 0px;
        }
  
        .detail-subtotal-line {
          margin-top: 22px;
        }
  
  .modal-content button.btn.btn-delete {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    padding: 0.5rem 1rem;
    font-size: 14px;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    margin-right: 12px;
    align-self: flex-end;
  }
  
  button.btn.btn-delete:hover {
    background-color: #eee;
  }
  
  .modal-content .button-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
  }
  
  .modal-content .button-footer button {
    min-width: 80px;
  }
  
  .modal-content .button-footer .btn-delete {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    color: #333;
  }
  
  .modal-content .button-footer .btn-delete:hover {
    background-color: #eee;
  }
  
  
  .modal-content {
    background: #fff;
    border-radius: 8px;
    box-sizing: border-box;
    position: relative;
    padding: 20px 20px 95px 20px;
    width: 70%;
    max-width: 600px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  form input[type="text"], form input[type="email"], form input[type="date"], form textarea {
    width: 94%;
    padding: 0.5rem;
    margin-top: 0.2rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
  }
  form select {
    width: 94%;
    padding: 0.5rem;
    margin-top: 0.2rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
  }
  input[type="color" i] {
    appearance: auto;
    inline-size: 50px;
    block-size: 27px;
    cursor: default;
    box-sizing: border-box;
    background-color: buttonface;
    color: buttontext;
    border-width: 1px;
    border-style: solid;
    border-color: buttonborder;
    border-image: initial;
    padding: 1px 2px;
  }
  input[type="number"] {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
  /* ハンバーガーメニュー */
  .hamburger-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    display: none;
  }
  
  .hamburger-icon {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 2001;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }
  
  .hamburger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
  }
  
  .hamburger-icon.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .hamburger-icon.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger-icon.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  .hamburger-content {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  
  .hamburger-content.active {
    left: 0;
  }
  
  .hamburger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    background-color: var(--unit-color);
    color: white;
    border-bottom: 1px solid #ddd;
  }
  
  .hamburger-header h3 {
    margin: 0;
    font-size: 18px;
  }
  
  .hamburger-close {
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s;
  }
  
  .hamburger-close:hover {
    background-color: rgba(255,255,255,0.2);
  }
  
  .hamburger-nav {
    padding: 0;
  }
  
  .hamburger-menu-link {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
    font-size: 16px;
  }
  
  .hamburger-menu-link:hover {
    background-color: #f5f5f5;
  }
  
  .hamburger-menu-link.current-menu {
    background-color: var(--unit-color);
    color: white;
    font-weight: bold;
  }
  
  /* モバイル表示のみでハンバーガーメニューを表示 */
  @media (min-width: 768px) {
    .hamburger-menu {
      display: none !important;
    }
  }
  
  @media (max-width: 767px) {
    .hamburger-menu {
      display: block;
    }
    .header-menu {
      display: none !important;
    }
  
    /* 携帯表示時の新規登録ボタンの位置修正 */
    

  }
  
  /* モーダル */
  .modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
  }
  
  .modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
  }
  
  .modal-close:hover,
  .modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
  }
  
  .btn-left {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
  }
  
  .btn-left:hover {
    background-color: #0056b3;
  }
  /* 基本スタイル */
body {
    background: #f5f5f5;
    margin: 0;
    font-family: 'Hind Siliguri', sans-serif;
}

h1,h2,h3,h4,p{
 font-weight: normal; 
 margin: 0;
 padding: 0;
}


.q-app-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    /* margin-top: 2rem; */
}
.q-app-content h3{
    font-weight: normal;
margin:26px 0 16px 0; 
}


.q-app-card {
    width: 250px;
    padding: 1rem;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s ease;
}

.q-app-card:hover {
    transform: translateY(-4px);
}

.q-app-icon {
    font-size: 64px;
    margin-bottom: -40px;
}

.q-app-content a {
    display: inline-block;
    margin-top: 0.5rem;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 1rem;
    border-radius: 5px;
    text-decoration: none;
}

.header-sub {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.main-title {
    text-align: center;
    color: #a6a6a6;
}

h2.main-title  {
margin:36px 0px 36px 0;
}


/* ヘッダー */
/* PC デフォルト */
header {
  background-color: var(--unit-color);
  color: white;
  padding: 0px;
  position: relative;
}
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.5rem 2rem;
  background-color: var(--unit-color);
  color: white;
}

header small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  opacity: 0.9;
}
.header-bar{
padding: 10px 10px 0px 10px;
}

.header-flex {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.header-title {
    margin: 0;
    font-size: 23px;
    font-weight: 400;
}

.header-welcome {
    margin: 11px 0 0 auto;
    font-size: 14px;
    text-align: right;
    position: absolute;
    top: 12px;
    right: 16px;
}


table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 14px;
}

table th,
table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
}

table thead {
    background-color: #f4f4f4;
}

table tbody tr:hover {
    background-color: #f0f8ff;
}




.unit-flex-left {
    flex: 1;
}

.unit-flex-right {
    flex: 0.4;
}

footer {
    background-color: #f2f2f2;
    color: #333;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    border-top: 1px solid #ccc;
    margin-top: 40px;
}

/* ナビ */
.header-welcome a {
    color: white;
    text-decoration: none;
}



main {
    padding: 10px;
}
.flash-message {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #28a745;
    background-color: #e6f9ec;
    color: #155724;
    border-radius: 4px;
    font-size: 14px;
  }
  

  .org-info-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 15px;
  }

  .org-info-table th {
    width: 150px;
    white-space: nowrap;
    text-align: left;
    padding: 8px;
    background-color: #f0f0f0;
    color: #333;
  }

  .org-info-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
  }

  .org-info-table tr:nth-child(even) td {
    background-color: #f9f9f9;
  }

  .org-info-table tr:hover td {
    background-color: #eaf4ff;
  }



  .save-button {
    margin-left: 8px;
    padding: 6px 12px;
    font-size: 14px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }

  .save-button:hover {
    background-color: #1e7e34;
  }

  .modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
  }

  .modal-content {
    background: #fff;
    max-width: 600px;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    position: relative;
  }

  .modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 20px;
    cursor: pointer;
  }

  .modal button {
    margin-top: 15px;
    padding: 6px 16px;
    background: #28a745;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
  }

  .modal button:hover {
    background: #218838;
  }



  .modal-open  {
    display: none;
  }


.mark-badge {
  display: inline-block;
  background-color: #f0f0f0;
  color: #333;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 13px;
  margin-right: 6px;
  margin-bottom: 4px;
  border: 1px solid #ccc;
}
      /* モーダル内フォーム入力欄の最大幅調整 */
      .modal-content form input[type="text"],
      .modal-content form input[type="email"],
      .modal-content form textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
      }
      /* 日付入力フィールドのスタイル */
      .modal-content form input[type="date"] {
        width: 94%;
        padding: 0.5rem;
        margin-top: 0.2rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
      }
      /* 画像モーダル用 */
      #image-modal {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.8);
        justify-content: center;
        align-items: center;
        z-index: 10000;
      }
      