/* =========================================================================
   Value Innovation 業務システム カスタムスタイル
   ========================================================================= */

/* 
   このファイルは AdminLTE の標準スタイルを活かすための
   必要最小限のカスタマイズのみを含みます。
*/

/* =========================================================================
   共通レイアウト・スタイル
   ========================================================================= */

/* 現行システムのスタイルを再現 */
.c-box--80 { width: 80px; }
.c-box--70 { width: 70px; }
.c-box--100 { width: 100px; }
.c-box--110 { width: 110px; }
.c-box--130 { width: 130px; }
.c-box--150 { width: 150px; }
.c-box--160 { width: 160px; }
.c-box--200 { width: 200px; }
.c-box--310 { width: 310px; }
.c-box--1180 { width: 1180px; }
.c-box--1200 { width: 1200px; }

.u-mt--xs { margin-top: 5px; }
.u-mr--xs { margin-right: 5px; }
.u-ml--xs { margin-left: 5px; }
.u-pr--ss { padding-right: 2px; }
.u-pr--sl { padding-right: 5px; }

.font-12 { font-size: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }


/* =========================================================================
   フォーム要素統一
   ========================================================================= */

/* 入力フィールドは全てsmサイズ */
.form-control {
    font-size: 12px;
    padding: 0.25rem 0.5rem;
}

/* textareaのサイズ調整 */
textarea.form-control-sm {
    font-size: 12px;
    padding: 0.25rem 0.5rem;
    line-height: 1.2;
}

/* 日付入力フィールドのスタイル */
input[type="date"] {
    font-size: 12px;
}

/* Select2のサイズ調整と統一 */
.select2-container--default .select2-selection--single {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: 12px;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem;
    background-color: #fff;
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
}

/* Select2のドロップダウン表示 */
.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Select2のコンテナ表示を確実にする */
.select2-container {
    display: block !important;
    width: 100% !important;
}

/* Select2の矢印アイコン */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 29px !important;
    right: 8px;
    top: 1px !important;
}

/* Select2の選択テキストの位置調整 */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    padding-left: 0;
    padding-right: 20px;
}

/* =========================================================================
   受注登録画面の改善スタイル
   ========================================================================= */

/* カードの影とボーダーを改善 */
.card.card-outline {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid #dee2e6;
}

/* .card.card-outline:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.15s ease-in-out;
} */

/* タブナビゲーションの改善 */
.nav-tabs.card-header-tabs {
    border-bottom: 1px solid #dee2e6;
    margin: 0;
    padding: 0;
}

.nav-tabs.card-header-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.15s ease-in-out;
    margin: 0;
    border-radius: 0;
}

.nav-tabs.card-header-tabs .nav-link:hover {
    border-color: transparent;
    color: #495057;
    background-color: rgba(23, 162, 184, 0.1);
}

.nav-tabs.card-header-tabs .nav-link.active {
    border-color: transparent;
    border-bottom-color: #17a2b8;
    color: #17a2b8;
    background-color: rgba(23, 162, 184, 0.1);
}

/* タブのオーバーフロー対策 */
.card-header-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.card-header-tabs::-webkit-scrollbar {
    height: 4px;
}

.card-header-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.card-header-tabs::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.card-header-tabs::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* フォームラベルの改善 */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* 入力グループの改善 */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #6c757d;
    font-size: 0.875rem;
}

/* input-group内のSelect2＋ボタンを1行に収める */
.input-group .input-group-select2-wrap {
    flex: 1 1 0%;
    min-width: 0;
}
.input-group .input-group-select2-wrap .select2-container {
    width: 100% !important;
    max-width: 100%;
}

/* ボタンの改善 */
.btn {
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* 操作ボタンセクションの改善 */
.btn-group-vertical .btn {
    margin-bottom: 0.5rem;
}

.btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* カレンダーの改善 */
.fc {
    font-family: inherit;
}

.fc-toolbar h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.fc-day-header {
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    font-size: 0.75rem;
    padding: 4px 2px;
}

.fc-day {
    border: 1px solid #dee2e6;
    transition: background-color 0.15s ease-in-out;
}

.fc-day-number {
    font-size: 0.75rem;
    padding: 2px;
}

.fc-day:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.fc-day.fc-today {
    background-color: rgba(40, 167, 69, 0.1);
    font-weight: 600;
}

/* テーブルの改善 */
.table {
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .nav-tabs.card-header-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .form-label {
        font-size: 0.8rem;
    }
}

/* =========================================================================
   上書きオプション設定の改善スタイル
   ========================================================================= */

/* 上書きオプションセクションの改善 */
.overwrite-section {
    background-color: #fff;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.overwrite-section h6 {
    margin-bottom: 1rem;
    color: #007bff;
}

/* チェックボックスの改善 */
.checkbox-inline {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* チェックボックスグループの改善 */
.checkbox-group {
    padding: 0.5rem 0;
}

/* アラートの改善 */
.alert-info {
    border-left: 4px solid #17a2b8;
    background-color: rgba(23, 162, 184, 0.1);
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-info i {
    color: #17a2b8;
}

/* 操作ボタンの改善 */
.btn-group .btn {
    border-radius: 0.375rem;
    margin: 0 0.25rem;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .overwrite-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .overwrite-section h6 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .custom-control-label {
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin: 0.25rem 0;
    }
}

/* =========================================================================
   操作セクションの改善スタイル
   ========================================================================= */

/* メイン操作セクション */
.main-action-section {
    padding: 2rem 0;
}

.main-action-btn {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease-in-out;
}

.main-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 123, 255, 0.4);
}

/* アクションカード */
.action-card {
    background: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease-in-out;
    height: 100%;
}

/* .action-card:hover {
    border-color: #17a2b8;
    box-shadow: 0 0.25rem 0.5rem rgba(23, 162, 184, 0.15);
    transform: translateY(-2px);
} */

.action-card-body {
    padding: 1.5rem 1rem;
    text-align: center;
}

.action-btn {
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

.action-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.action-btn:hover {
    transform: scale(1.05);
}

/* ナビゲーションセクション */
.navigation-section {
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
}

.navigation-section .btn {
    margin: 0 0.25rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main-action-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .action-card-body {
        padding: 1rem 0.75rem;
    }
    
    .action-btn {
        height: 70px;
    }
    
    .action-btn i {
        font-size: 1.25rem;
    }
}

/* Select2の高さを完全に統一 */
.select2-container--default .select2-selection--single {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 29px !important;
    top: 1px !important;
}

/* form-control-smの高さと完全に一致させる */
.form-control-sm {
    height: 31px !important;
}

/* Select2のプレースホルダーテキストの色調整 */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}


/* フォントサイズ統一 */
.card-title {
    font-size: 1.1rem !important;
    font-weight: 600;
}

label {
    font-size: 0.8rem !important;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-control, .form-control-sm {
    font-size: 0.875rem !important;
}

/* セクションヘッダーの統一 */
.card-header h3.card-title {
    font-size: 1rem !important;
    margin-bottom: 0;
}

/* =========================================================================
   テーブルスタイル
   ========================================================================= */

/* テーブルのスタイル */
.table th {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px;
    font-weight: bold;
    font-size: 12px;
}

.table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    font-size: 12px;
}

/* =========================================================================
   ページネーション・その他
   ========================================================================= */

.pagination-limit {
    margin-left: 10px;
}

/* =========================================================================
   その他のカスタマイズ
   ========================================================================= */

/* 新規登録画面のスタイル */
.pull-left { float: left; }
.pull-right { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }

.u-mr--ms { margin-right: 15px; }
.u-mr--sl { margin-right: 10px; }

.c-box--60 { width: 60px; }
.c-box--95 { width: 95px; }
.c-box--380 { width: 380px; }
.c-box--400 { width: 400px; }
.c-box--full { width: 100%; }

.label-box { line-height: 25px; }

/* タブのスタイル */
.nav-tabs .nav-link {
    color: #495057;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* ドロップエリアのスタイル */
.dropArea {
    border: 2px dashed #dee2e6;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out;
}

.dropArea:hover {
    border-color: #007bff;
}

.border-dashed {
    border-style: dashed;
}

/* チェックボックスのスタイル */
.checkbox {
    display: block;
    margin-bottom: 0.5rem;
}

.checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* 上書きオプション設定のスタイル */
.head-op-child-section {
    margin-left: 20px;
}

/* テーブルの行追加・削除ボタン */
.btn[name="btn_add_row"] {
    margin: 0;
}

/* 時間入力フィールドのスタイル */
input[type="time"] {
    font-size: 12px;
}

/* ファイルアップロード関連 */
.fileUploadGroup {
    position: relative;
}

.fileName {
    font-size: 12px;
    color: #6c757d;
}

.dl-area {
    visibility: hidden;
}

/* 所感タブの完了・取消ボタン */
.completed, .canceled {
    margin: 0 2px;
}

/* 所感タブのファイルアップロードエリア */
.drag-drop-area-imp {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.drag-drop-area-imp:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.drag-drop-area-imp i {
    color: #6c757d;
    margin-bottom: 8px;
    font-size: 1.5em;
}

.drag-drop-area-imp span {
    color: #495057;
    font-size: 11px;
    line-height: 1.3;
}

.fileUploadGroup {
    width: 200px;
}

/* マージン調整 */
.margin-top-xs {
    margin-top: 5px;
}

/* 税込金額表示 */
.calc-price {
    font-weight: bold;
    color: #28a745;
}


/* 企業検索ボタン */
.btn-info {
    margin-left: 5px;
}

/* 詳細ボタンの無効状態 */
.btn-info-disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-info-disabled:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* フォームラベルのスタイル */
.form-label {
    font-weight: 500;
    color: #495057;
}

/* テーブルヘッダーのスタイル調整 */
.table th {
    vertical-align: middle;
    white-space: nowrap;
}

/* 入力フィールドの幅調整 */
.form-control.c-box--full {
    width: 100%;
}

/* 日付入力フィールドの幅調整 */
input[type="date"].c-box--130 {
    width: 130px;
}

/* テキスト右寄せ */
.text-right {
    text-align: right;
}

/* 小さいテキスト */
small {
    font-size: 80%;
    color: #6c757d;
}

/* d-flex関連のスタイル */
.d-flex-item {
    flex: 1;
}

.d-flex-item:not(:last-child) {
    margin-right: 1rem;
}

/* Select2関連のスタイル */
.select2-container--default .select2-selection--single {
    height: 31px;
    line-height: 31px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 31px;
    padding-left: 0.75rem;
    padding-right: 20px;
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 29px;
    position: absolute;
    top: 1px;
    right: 1px;
    width: 20px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #495057;
    line-height: 31px;
    padding-left: 0.75rem;
    padding-right: 20px;
}

.select2-container--default .select2-selection--single {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    height: 31px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
    line-height: 31px;
}

/* Select2ドロップダウンのテキストサイズ調整 */
.select2-results__option {
    font-size: 12px !important;
    padding: 4px 8px !important;
}

.select2-results__option--highlighted {
    font-size: 12px !important;
}

.select2-search__field {
    font-size: 12px !important;
}

/* カレンダー関連のスタイル */
.calendar-root-node {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    background-color: #fff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #dee2e6;
}

.calendar-header {
    background-color: #f8f9fa;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    border: 1px solid #dee2e6;
}

.calendar-day {
    background-color: #fff;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #dee2e6;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #e9ecef;
}

.calendar-day.empty {
    background-color: #f8f9fa;
    cursor: default;
}

.calendar-day.marked {
    background-color: #E2FFE7 !important;
}

/* テーブル関連のスタイル */
.table-responsive {
    overflow-x: auto;
}

.table th {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.table td {
    vertical-align: middle;
}

/* ボタングループのスタイル */
.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* ファイルアップロードエリアのスタイル */
.dropArea {
    border: 2px dashed #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.dropArea:hover {
    border-color: #007bff;
}

.border-dashed {
    border-style: dashed;
}

/* チェックボックスのスタイル */
.checkbox {
    display: block;
    margin-bottom: 0.5rem;
}

.checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* 上書きオプション設定のスタイル */
.head-op-child-section {
    margin-left: 1rem;
}

.head-op-child-section h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* タブのスタイル */
.nav-tabs .nav-link {
    color: #495057;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    font-weight: bold;
}

/* フォーム要素のサイズ調整 */
.form-control-sm {
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* 金額表示のスタイル */
.calc-price {
    font-weight: bold;
    color: #28a745;
}

.total-sales {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1em;
}

/* 税率表示のスタイル */
.tax_rate {
    font-weight: bold;
    color: #6c757d;
}

/* 日付入力フィールドのスタイル */
input[type="date"] {
    font-family: inherit;
}

input[type="time"] {
    font-family: inherit;
}

/* 検索ボタンのスタイル */
.btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-info:hover {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

/* 詳細ボタンのスタイル */
.btn-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    color: #fff;
    background-color: #138496;
    border-color: #117a8b;
}

/* 無効化されたボタンのスタイル */
.btn-outline-secondary.disabled,
.btn-outline-secondary:disabled {
    color: #6c757d;
    background-color: transparent;
    border-color: #6c757d;
    opacity: 0.65;
}

/* 行追加・削除ボタンのスタイル */
.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}

.btn-outline-success:hover {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

/* 所感完了ボタンのスタイル */
.completed {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

.completed:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.canceled {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.canceled:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendar-day {
        padding: 0.25rem;
        min-height: 30px;
        font-size: 0.8rem;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* カスタムユーティリティクラス */
.c-box--full {
    width: 100%;
}

.c-box--70 {
    width: 70px;
}

.c-box--80 {
    width: 80px;
}

.c-box--90 {
    width: 90px;
}

.c-box--95 {
    width: 95px;
}

.c-box--100 {
    width: 100px;
}

.c-box--110 {
    width: 110px;
}

.c-box--130 {
    width: 130px;
}

.c-box--150 {
    width: 150px;
}

.c-box--200 {
    width: 200px;
}

.c-box--300 {
    width: 300px;
}

.c-box--380 {
    width: 380px;
}

.c-box--400 {
    width: 400px;
}

.c-box--60 {
    width: 60px;
}

.u-mr--xs {
    margin-right: 0.25rem;
}

.u-mr--ms {
    margin-right: 0.5rem;
}

.u-mr--sl {
    margin-right: 0.75rem;
}

.u-mt--xs {
    margin-top: 0.25rem;
}

.u-pr--xs {
    padding-right: 0.25rem;
}

.text-right {
    text-align: right;
}

.d-table {
    display: table;
}

.d-table-cell {
    display: table-cell;
    vertical-align: middle;
}

.pull-left {
    float: left;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.font-12 {
    font-size: 12px;
}

.label-box {
    line-height: 25px;
}

/* =========================================================================
   FullCalendar カスタムスタイル
   ========================================================================= */

/* カレンダーツールバーのタイトル */
.fc-toolbar h4 {
    font-size: 1.1rem;
    margin: 0;
}

/* カレンダーの日付ヘッダー */
.fc-day-header {
    font-size: 0.8rem;
    padding: 4px 2px;
}

/* カレンダーの日付セル */
.fc-day {
    height: 30px;
    font-size: 0.8rem;
}

/* カレンダーの日付番号 */
.fc-day-number {
    font-size: 0.8rem;
}

/* カレンダーの日付セルホバー */
.fc-day:hover {
    background-color: #f8f9fa;
}

/* カレンダーの今日の日付 */
.fc-day.fc-today {
    background-color: #e3f2fd !important;
}

/* 進捗カレンダーの高さ */
.progress-calendar {
    height: 80px;
}

/* =========================================================================
   受注詳細画面 カスタムスタイル
   ========================================================================= */

/* 受注詳細セクションの間隔 */
.order-detail-section {
    margin-bottom: 1.5rem;
}

/* 受注詳細テーブルのヘッダー */
.order-detail-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    width: 150px;
}

/* 受注詳細テーブルのセル */
.order-detail-table td {
    vertical-align: middle;
}

/* ステータスバッジ */
.status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* 価格テキスト */
.price-text {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* カレンダーコンテナ */
.calendar-container {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 1rem;
}

/* =========================================================================
   受注カレンダー カスタムスタイル
   ========================================================================= */

/* スケジュールコンテナ */
.schedule-container {
    min-height: auto;
    padding: 2px;
    position: relative;
}

/* スケジュールアイテム */
.schedule-item {
    background-color: #e3f2fd;
    color: #1976d2;
    font-size: 0.7rem;
    padding: 6px 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    white-space: normal;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #bbdefb;
    font-weight: 500;
    height: 45px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    word-wrap: break-word;
    word-break: break-all;
}

.schedule-item:hover {
    background-color: #bbdefb;
    color: #0d47a1;
}

/* 新規追加用の余白 */
.add-schedule-space {
    height: 20px;
    border: 1px dashed #ccc;
    border-radius: 3px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.add-schedule-space:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

.add-schedule-space::before {
    content: "+";
    color: #6c757d;
    font-size: 14px;
    font-weight: bold;
}

.add-schedule-space:hover::before {
    color: #007bff;
}

/* カレンダーテーブル */
.calendar-table {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.calendar-table tbody tr:first-child td {
    border-top: none !important;
    padding-top: 4px !important;
}

/* カレンダー表示エリアの余白調整 */
.calendar-display-area {
    padding-top: 0 !important;
}

.calendar-display-area .table-responsive {
    margin-top: 0 !important;
}

/* カレンダーセル */
.calendar-cell {
    vertical-align: top !important;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding: 2px !important;
    cursor: default;
    height: auto;
}

/* データ行のtdを上詰めに */
.calendar-cell td {
    vertical-align: top !important;
}

/* スケジュールコンテナを上詰めに */
.schedule-container {
    min-height: auto;
    padding: 2px;
    position: relative;
    vertical-align: top !important;
}

/* 土曜日の色 */
.weekend {
    color: #007bff;
}

/* 日曜日・祝日の色 */
.holiday {
    color: #dc3545;
}

/* Select2の選択された文字色を黒に */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    color: #000 !important;
    background-color: #e3f2fd !important;
    border: 1px solid #bbdefb !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #000 !important;
}

/* =========================================================================
   バリデーションエラー表示（Orders add/edit/hikiai 共通）
   ========================================================================= */

.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-invalid + .select2-container .select2-selection,
.select2-container--default.is-invalid + .select2-container .select2-selection {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.select2-container--default .select2-selection.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-invalid + label,
label:has(+ .is-invalid) {
    color: #dc3545 !important;
    font-weight: 600;
}

.alert.alert-danger {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card.border-danger {
    border-color: #dc3545 !important;
    border-width: 2px;
}

.card-header.bg-danger-light {
    background-color: #f8d7da !important;
}

#error-summary {
    margin-bottom: 20px;
    background-color: #dc3545;
    border-color: #dc3545;
}

#error-summary .alert-heading,
#error-summary p,
#error-summary #error-list,
#error-summary #error-list li,
#error-summary #error-list a.error-link,
#error-summary .close {
    color: #fff !important;
}

#error-summary .close:hover {
    color: #fff !important;
    opacity: 0.8;
}

#error-summary #error-list a.error-link:hover {
    color: #f8f9fa !important;
}

#error-list {
    max-height: 200px;
    overflow-y: auto;
}

#error-list li {
    margin-bottom: 5px;
}

#error-list a.error-link {
    text-decoration: underline;
}

.error-badge {
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
