/**
 * Bootstrap 3 Compatibility CSS - Enhanced Version
 * このファイルはBootstrap 5でBootstrap 3の見た目を完全に再現します
 */

/* ===== リセットとベース ===== */

/* Bootstrap 3のベーススタイルを強制適用 */
* {
    box-sizing: border-box !important;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
    color: #333 !important;
    background-color: #fff !important;
}

/* ===== グリッドシステム ===== */

/* Bootstrap 3のコンテナ */
.container {
    padding-right: 15px !important;
    padding-left: 15px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    max-width: 1170px !important;
}

.container-fluid {
    padding-right: 15px !important;
    padding-left: 15px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

/* Bootstrap 3の行 */
.row {
    margin-right: -15px !important;
    margin-left: -15px !important;
}

.row::before,
.row::after {
    display: table !important;
    content: " " !important;
}

.row::after {
    clear: both !important;
}

/* Bootstrap 3のカラム */
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1,
.col-xs-2, .col-sm-2, .col-md-2, .col-lg-2,
.col-xs-3, .col-sm-3, .col-md-3, .col-lg-3,
.col-xs-4, .col-sm-4, .col-md-4, .col-lg-4,
.col-xs-5, .col-sm-5, .col-md-5, .col-lg-5,
.col-xs-6, .col-sm-6, .col-md-6, .col-lg-6,
.col-xs-7, .col-sm-7, .col-md-7, .col-lg-7,
.col-xs-8, .col-sm-8, .col-md-8, .col-lg-8,
.col-xs-9, .col-sm-9, .col-md-9, .col-lg-9,
.col-xs-10, .col-sm-10, .col-md-10, .col-lg-10,
.col-xs-11, .col-sm-11, .col-md-11, .col-lg-11,
.col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
    position: relative !important;
    min-height: 1px !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    float: left !important;
}

/* ===== フォーム ===== */

/* Bootstrap 3のフォームグループ */
.form-group {
    margin-bottom: 15px !important;
}

/* Bootstrap 3のフォームコントロール */
.form-control {
    display: block !important;
    width: 100% !important;
    height: 34px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
    color: #555 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !important;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s !important;
    margin-bottom: 0 !important;
}

.form-control:focus {
    border-color: #66afe9 !important;
    outline: 0 !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6) !important;
}

/* Bootstrap 3のラベル */
label {
    display: inline-block !important;
    max-width: 100% !important;
    margin-bottom: 5px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
}

/* ラジオボタンとチェックボックス */
.radio,
.checkbox {
    position: relative !important;
    display: block !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

.radio label,
.checkbox label {
    min-height: 20px !important;
    padding-left: 20px !important;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
}

.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
    position: absolute !important;
    margin-top: 4px \9 !important;
    margin-left: -20px !important;
}

/* ラジオボタンとチェックボックスのインライン */
.radio-inline,
.checkbox-inline {
    position: relative !important;
    display: inline-block !important;
    padding-left: 20px !important;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    margin-right: 10px !important;
}

/* 入力グループ */
.input-group {
    position: relative !important;
    display: table !important;
    border-collapse: separate !important;
    width: 100% !important;
}

.input-group-addon {
    display: table-cell !important;
    width: 1% !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    color: #555 !important;
    text-align: center !important;
    background-color: #eee !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
}

.input-group-addon:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-addon:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* ===== ボタン ===== */

/* Bootstrap 3のボタン */
.btn {
    display: inline-block !important;
    padding: 6px 12px !important;
    margin-bottom: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.42857143 !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    user-select: none !important;
    background-image: none !important;
}

.btn-default {
    color: #333 !important;
    background-color: #fff !important;
    border-color: #ccc !important;
}

.btn-default:hover {
    color: #333 !important;
    background-color: #e6e6e6 !important;
    border-color: #adadad !important;
}

.btn-primary {
    color: #fff !important;
    background-color: #337ab7 !important;
    border-color: #2e6da4 !important;
}

.btn-primary:hover {
    color: #fff !important;
    background-color: #286090 !important;
    border-color: #204d74 !important;
}

.btn-success {
    color: #fff !important;
    background-color: #5cb85c !important;
    border-color: #4cae4c !important;
}

.btn-info {
    color: #fff !important;
    background-color: #5bc0de !important;
    border-color: #46b8da !important;
}

.btn-warning {
    color: #fff !important;
    background-color: #f0ad4e !important;
    border-color: #eea236 !important;
}

.btn-danger {
    color: #fff !important;
    background-color: #d9534f !important;
    border-color: #d43f3a !important;
}

/* ボタンサイズ */
.btn-sm {
    padding: 5px 10px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    border-radius: 3px !important;
}

.btn-lg {
    padding: 10px 16px !important;
    font-size: 18px !important;
    line-height: 1.3333333 !important;
    border-radius: 6px !important;
}

/* ===== テーブル ===== */

/* Bootstrap 3のテーブル - 画像に合わせて詳細調整 */
.table {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
    background-color: transparent !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    padding: 8px !important;
    line-height: 1.42857143 !important;
    vertical-align: top !important;
    border-top: 1px solid #ddd !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
}

.table > thead > tr > th {
    vertical-align: bottom !important;
    border-bottom: 2px solid #ddd !important;
    font-weight: bold !important;
    background-color: #f5f5f5 !important;
    text-align: center !important;
}

.table > tbody > tr > td {
    border-bottom: 1px solid #ddd !important;
    vertical-align: middle !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9 !important;
}

/* テーブル内の入力フィールド */
.table .form-control {
    width: 120px !important;
    min-width: 120px !important;
    height: 30px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    margin: 0 !important;
}

/* テーブル内のボタン */
.table .btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    margin: 2px !important;
}

/* テーブル内のアイコンとボタンの間隔 */
.table .input-group {
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
}

.table .input-group .form-control {
    width: 100px !important;
    min-width: 100px !important;
}

.table .input-group-addon {
    padding: 4px 6px !important;
    font-size: 12px !important;
}

/* テーブル内のカレンダーアイコンとボタン */
.table .glyphicon,
.table .fa,
.table .icon {
    margin: 0 2px !important;
    font-size: 12px !important;
}

/* ===== パネル ===== */

/* Bootstrap 3のパネル */
.panel {
    margin-bottom: 20px !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.1) !important;
}

.panel-heading {
    padding: 10px 15px !important;
    border-bottom: 1px solid #ddd !important;
    border-top-left-radius: 3px !important;
    border-top-right-radius: 3px !important;
    background-color: #f5f5f5 !important;
}

.panel-title {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: 16px !important;
    color: inherit !important;
}

.panel-body {
    padding: 15px !important;
}

.panel-footer {
    padding: 10px 15px !important;
    background-color: #f5f5f5 !important;
    border-top: 1px solid #ddd !important;
    border-bottom-right-radius: 3px !important;
    border-bottom-left-radius: 3px !important;
}

/* ===== アラート ===== */

/* Bootstrap 3のアラート */
.alert {
    padding: 15px !important;
    margin-bottom: 20px !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
}

.alert-success {
    color: #3c763d !important;
    background-color: #dff0d8 !important;
    border-color: #d6e9c6 !important;
}

.alert-info {
    color: #31708f !important;
    background-color: #d9edf7 !important;
    border-color: #bce8f1 !important;
}

.alert-warning {
    color: #8a6d3b !important;
    background-color: #fcf8e3 !important;
    border-color: #faebcc !important;
}

.alert-danger {
    color: #a94442 !important;
    background-color: #f2dede !important;
    border-color: #ebccd1 !important;
}

/* ===== ラベル ===== */

/* Bootstrap 3のラベル */
.label {
    display: inline !important;
    padding: .2em .6em .3em !important;
    font-size: 75% !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #fff !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: baseline !important;
    border-radius: .25em !important;
}

.label-default {
    background-color: #777 !important;
}

.label-primary {
    background-color: #337ab7 !important;
}

.label-success {
    background-color: #5cb85c !important;
}

.label-info {
    background-color: #5bc0de !important;
}

.label-warning {
    background-color: #f0ad4e !important;
}

.label-danger {
    background-color: #d9534f !important;
}

/* ===== ナビゲーション ===== */

/* Bootstrap 3のナビゲーション */
.nav {
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    list-style: none !important;
}

.nav > li {
    position: relative !important;
    display: block !important;
}

.nav > li > a {
    position: relative !important;
    display: block !important;
    padding: 10px 15px !important;
    text-decoration: none !important;
}

.nav-tabs {
    border-bottom: 1px solid #ddd !important;
}

.nav-tabs > li {
    float: left !important;
    margin-bottom: -1px !important;
}

.nav-tabs > li > a {
    margin-right: 2px !important;
    line-height: 1.42857143 !important;
    border: 1px solid transparent !important;
    border-radius: 4px 4px 0 0 !important;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
    color: #555 !important;
    cursor: default !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-bottom-color: transparent !important;
}

/* ===== モーダル ===== */

/* Bootstrap 3のモーダル */
.modal-header {
    padding: 15px !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

.modal-title {
    margin: 0 !important;
    line-height: 1.42857143 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
}

.modal-body {
    position: relative !important;
    padding: 15px !important;
}

.modal-footer {
    padding: 15px !important;
    text-align: right !important;
    border-top: 1px solid #e5e5e5 !important;
}

/* ===== ドロップダウン ===== */

/* Bootstrap 3のドロップダウン */
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 1000 !important;
    display: none !important;
    float: left !important;
    min-width: 160px !important;
    padding: 5px 0 !important;
    margin: 2px 0 0 !important;
    font-size: 14px !important;
    text-align: left !important;
    list-style: none !important;
    background-color: #fff !important;
    border: 1px solid #ccc !important;
    border: 1px solid rgba(0,0,0,.15) !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 12px rgba(0,0,0,.175) !important;
    background-clip: padding-box !important;
}

.dropdown-menu > li > a {
    display: block !important;
    padding: 3px 20px !important;
    clear: both !important;
    font-weight: 400 !important;
    line-height: 1.42857143 !important;
    color: #333 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

.dropdown-menu > li > a:hover {
    color: #262626 !important;
    text-decoration: none !important;
    background-color: #f5f5f5 !important;
}

/* ===== ユーティリティ ===== */

/* Bootstrap 3のユーティリティクラス */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

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

.pull-left {
    float: left !important;
}

.pull-right {
    float: right !important;
}

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

/* マージンとパディング */
.m-0 { margin: 0 !important; }
.m-1 { margin: 5px !important; }
.m-2 { margin: 10px !important; }
.m-3 { margin: 15px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 5px !important; }
.mt-2 { margin-top: 10px !important; }
.mt-3 { margin-top: 15px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 5px !important; }
.mb-2 { margin-bottom: 10px !important; }
.mb-3 { margin-bottom: 15px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 5px !important; }
.p-2 { padding: 10px !important; }
.p-3 { padding: 15px !important; }

/* ===== レスポンシブ ===== */

/* Bootstrap 3のレスポンシブグリッド */
@media (min-width: 768px) {
    .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
        float: left !important;
    }
    .col-sm-12 { width: 100% !important; }
    .col-sm-11 { width: 91.66666667% !important; }
    .col-sm-10 { width: 83.33333333% !important; }
    .col-sm-9 { width: 75% !important; }
    .col-sm-8 { width: 66.66666667% !important; }
    .col-sm-7 { width: 58.33333333% !important; }
    .col-sm-6 { width: 50% !important; }
    .col-sm-5 { width: 41.66666667% !important; }
    .col-sm-4 { width: 33.33333333% !important; }
    .col-sm-3 { width: 25% !important; }
    .col-sm-2 { width: 16.66666667% !important; }
    .col-sm-1 { width: 8.33333333% !important; }
}

@media (min-width: 992px) {
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        float: left !important;
    }
    .col-md-12 { width: 100% !important; }
    .col-md-11 { width: 91.66666667% !important; }
    .col-md-10 { width: 83.33333333% !important; }
    .col-md-9 { width: 75% !important; }
    .col-md-8 { width: 66.66666667% !important; }
    .col-md-7 { width: 58.33333333% !important; }
    .col-md-6 { width: 50% !important; }
    .col-md-5 { width: 41.66666667% !important; }
    .col-md-4 { width: 33.33333333% !important; }
    .col-md-3 { width: 25% !important; }
    .col-md-2 { width: 16.66666667% !important; }
    .col-md-1 { width: 8.33333333% !important; }
}

@media (min-width: 1200px) {
    .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
    .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
        float: left !important;
    }
    .col-lg-12 { width: 100% !important; }
    .col-lg-11 { width: 91.66666667% !important; }
    .col-lg-10 { width: 83.33333333% !important; }
    .col-lg-9 { width: 75% !important; }
    .col-lg-8 { width: 66.66666667% !important; }
    .col-lg-7 { width: 58.33333333% !important; }
    .col-lg-6 { width: 50% !important; }
    .col-lg-5 { width: 41.66666667% !important; }
    .col-lg-4 { width: 33.33333333% !important; }
    .col-lg-3 { width: 25% !important; }
    .col-lg-2 { width: 16.66666667% !important; }
    .col-lg-1 { width: 8.33333333% !important; }
}

/* ===== その他のBootstrap 3スタイル ===== */

/* ヘルプテキスト */
.help-block {
    display: block !important;
    margin-top: 5px !important;
    margin-bottom: 10px !important;
    color: #737373 !important;
    font-size: 12px !important;
}

/* 必須フィールド */
.required {
    color: #a94442 !important;
}

/* フォーム検証 */
.has-error .form-control {
    border-color: #a94442 !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !important;
}

.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline {
    color: #a94442 !important;
}

.has-success .form-control {
    border-color: #3c763d !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !important;
}

.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline {
    color: #3c763d !important;
}

/* フォームの水平レイアウト */
.form-horizontal .form-group {
    margin-right: -15px !important;
    margin-left: -15px !important;
}

.form-horizontal .form-group::before,
.form-horizontal .form-group::after {
    display: table !important;
    content: " " !important;
}

.form-horizontal .form-group::after {
    clear: both !important;
}

.form-horizontal .control-label {
    padding-top: 7px !important;
    margin-bottom: 0 !important;
    text-align: right !important;
}

/* インラインラジオボタンとチェックボックスの間隔 */
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
    margin-left: 10px !important;
}

/* フォーム要素の間隔調整 */
.form-group + .form-group {
    margin-top: 15px !important;
}

/* 入力フィールドの幅調整 */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100% !important;
    max-width: 100% !important;
}

/* 小さな入力フィールド用 */
.input-sm {
    height: 30px !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    border-radius: 3px !important;
}

/* 大きな入力フィールド用 */
.input-lg {
    height: 46px !important;
    padding: 10px 16px !important;
    font-size: 18px !important;
    line-height: 1.3333333 !important;
    border-radius: 6px !important;
}

/* ===== 画像に合わせた特別な調整 ===== */

/* テーブル内の日付入力フィールド */
.table input[type="text"][placeholder*="日"],
.table input[type="text"][placeholder*="date"],
.table .date-input {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: 28px !important;
    padding: 3px 6px !important;
    font-size: 11px !important;
    margin: 0 !important;
}

/* テーブル内のアイコンボタン */
.table .btn-xs {
    padding: 2px 4px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    border-radius: 2px !important;
    margin: 1px !important;
}

/* テーブル内の詳細ボタン */
.table .btn-detail {
    padding: 3px 6px !important;
    font-size: 11px !important;
    background-color: #337ab7 !important;
    color: white !important;
    border-color: #2e6da4 !important;
}

/* テーブル内の削除ボタン（赤い×） */
.table .btn-danger,
.table .btn-remove {
    padding: 2px 4px !important;
    font-size: 10px !important;
    background-color: #d9534f !important;
    color: white !important;
    border-color: #d43f3a !important;
}

/* テーブル内のカレンダーアイコン */
.table .glyphicon-calendar,
.table .fa-calendar,
.table .calendar-icon {
    font-size: 11px !important;
    color: #337ab7 !important;
    margin: 0 2px !important;
    cursor: pointer !important;
}

/* テーブル内の入力グループの調整 */
.table .input-group {
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
}

.table .input-group .form-control {
    flex: 1 !important;
    min-width: 80px !important;
}

.table .input-group-addon {
    flex-shrink: 0 !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
}

/* テーブルセルの垂直中央揃え */
.table td {
    vertical-align: middle !important;
    padding: 6px 8px !important;
}

/* テーブルヘッダーの中央揃え */
.table th {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 6px !important;
    font-weight: bold !important;
    background-color: #f5f5f5 !important;
}

/* ステータス表示（済、未済など） */
.status-completed {
    color: #5cb85c !important;
    font-weight: bold !important;
}

.status-pending {
    color: #f0ad4e !important;
    font-weight: bold !important;
}

/* ページネーション */
.pagination {
    display: inline-block !important;
    padding-left: 0 !important;
    margin: 20px 0 !important;
    border-radius: 4px !important;
}

.pagination > li {
    display: inline !important;
}

.pagination > li > a,
.pagination > li > span {
    position: relative !important;
    float: left !important;
    padding: 6px 12px !important;
    margin-left: -1px !important;
    line-height: 1.42857143 !important;
    color: #337ab7 !important;
    text-decoration: none !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
}

.pagination > li:first-child > a,
.pagination > li:first-child > span {
    margin-left: 0 !important;
    border-top-left-radius: 4px !important;
    border-bottom-left-radius: 4px !important;
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
} 

/* 追加の修正 - Bootstrap 5の競合を防ぐ */
/* Bootstrap 5の新しいクラスをBootstrap 3スタイルに上書き */
.btn-group > .btn {
    position: relative !important;
    float: left !important;
}

.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
    border-radius: 0 !important;
}

.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.btn-group > .btn:last-child:not(:first-child):not(.dropdown-toggle) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* モーダルの修正 */
.modal-dialog {
    margin: 30px auto !important;
}

.modal-content {
    position: relative !important;
    background-color: #fff !important;
    border: 1px solid #999 !important;
    border: 1px solid rgba(0,0,0,.2) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 9px rgba(0,0,0,.5) !important;
    background-clip: padding-box !important;
    outline: 0 !important;
}

/* ドロップダウンの修正 */
.dropdown-toggle::after {
    display: none !important;
}

/* フォームの修正 */
.form-select {
    display: block !important;
    width: 100% !important;
    height: 34px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
    color: #555 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !important;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s !important;
}

/* アラートの修正 */
.alert-dismissible .btn-close {
    position: relative !important;
    top: -2px !important;
    right: -21px !important;
    z-index: 2 !important;
    padding: 0 !important;
    cursor: pointer !important;
    background: 0 0 !important;
    border: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #000 !important;
    text-shadow: 0 1px 0 #fff !important;
    opacity: .2 !important;
}

/* ナビゲーションの修正 */
.navbar-nav > li > a {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
    color: #333 !important;
    background-color: #e7e7e7 !important;
}

/* パネルの修正 */
.panel-group .panel {
    margin-bottom: 0 !important;
    border-radius: 4px !important;
}

.panel-group .panel + .panel {
    margin-top: 5px !important;
}

/* グリッドの修正 */
.row-cols-1 > * {
    flex: 0 0 auto !important;
    width: 100% !important;
}

.row-cols-2 > * {
    flex: 0 0 auto !important;
    width: 50% !important;
}

.row-cols-3 > * {
    flex: 0 0 auto !important;
    width: 33.33333333% !important;
}

.row-cols-4 > * {
    flex: 0 0 auto !important;
    width: 25% !important;
}

.row-cols-5 > * {
    flex: 0 0 auto !important;
    width: 20% !important;
}

.row-cols-6 > * {
    flex: 0 0 auto !important;
    width: 16.66666667% !important;
}

/* 強制的にBootstrap 3スタイルを適用 */
*[class*="col-"] {
    float: left !important;
    position: relative !important;
    min-height: 1px !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
}

/* フォーム要素の強制適用 */
input, select, textarea {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
}

/* ボタンの強制適用 */
button, .btn {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.42857143 !important;
}

/* th要素の修正 - col-md-*クラスが適用されている場合の対応 */
th[class*="col-"] {
    display: table-cell !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    text-align: center !important;
}

/* テーブルヘッダーの基本スタイル */
th {
    padding: 8px !important;
    line-height: 1.42857143 !important;
    vertical-align: middle !important;
    border-top: 1px solid #ddd !important;
    border-bottom: 2px solid #ddd !important;
    text-align: center !important;
    font-weight: bold !important;
    background-color: #f5f5f5 !important;
    color: #333 !important;
}

/* テーブルヘッダーの幅調整 */
th.col-md-1 { width: 8.33333333% !important; }
th.col-md-2 { width: 16.66666667% !important; }
th.col-md-3 { width: 25% !important; }
th.col-md-4 { width: 33.33333333% !important; }
th.col-md-5 { width: 41.66666667% !important; }
th.col-md-6 { width: 50% !important; }
th.col-md-7 { width: 58.33333333% !important; }
th.col-md-8 { width: 66.66666667% !important; }
th.col-md-9 { width: 75% !important; }
th.col-md-10 { width: 83.33333333% !important; }
th.col-md-11 { width: 91.66666667% !important; }
th.col-md-12 { width: 100% !important; }

th.col-sm-1 { width: 8.33333333% !important; }
th.col-sm-2 { width: 16.66666667% !important; }
th.col-sm-3 { width: 25% !important; }
th.col-sm-4 { width: 33.33333333% !important; }
th.col-sm-5 { width: 41.66666667% !important; }
th.col-sm-6 { width: 50% !important; }
th.col-sm-7 { width: 58.33333333% !important; }
th.col-sm-8 { width: 66.66666667% !important; }
th.col-sm-9 { width: 75% !important; }
th.col-sm-10 { width: 83.33333333% !important; }
th.col-sm-11 { width: 91.66666667% !important; }
th.col-sm-12 { width: 100% !important; }

th.col-lg-1 { width: 8.33333333% !important; }
th.col-lg-2 { width: 16.66666667% !important; }
th.col-lg-3 { width: 25% !important; }
th.col-lg-4 { width: 33.33333333% !important; }
th.col-lg-5 { width: 41.66666667% !important; }
th.col-lg-6 { width: 50% !important; }
th.col-lg-7 { width: 58.33333333% !important; }
th.col-lg-8 { width: 66.66666667% !important; }
th.col-lg-9 { width: 75% !important; }
th.col-lg-10 { width: 83.33333333% !important; }
th.col-lg-11 { width: 91.66666667% !important; }
th.col-lg-12 { width: 100% !important; }

/* テーブルセルの修正 - col-md-*クラスが適用されている場合の対応 */
td[class*="col-"] {
    display: table-cell !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
}

/* テーブルセルの幅調整 */
td.col-md-1 { width: 8.33333333% !important; }
td.col-md-2 { width: 16.66666667% !important; }
td.col-md-3 { width: 25% !important; }
td.col-md-4 { width: 33.33333333% !important; }
td.col-md-5 { width: 41.66666667% !important; }
td.col-md-6 { width: 50% !important; }
td.col-md-7 { width: 58.33333333% !important; }
td.col-md-8 { width: 66.66666667% !important; }
td.col-md-9 { width: 75% !important; }
td.col-md-10 { width: 83.33333333% !important; }
td.col-md-11 { width: 91.66666667% !important; }
td.col-md-12 { width: 100% !important; }

td.col-sm-1 { width: 8.33333333% !important; }
td.col-sm-2 { width: 16.66666667% !important; }
td.col-sm-3 { width: 25% !important; }
td.col-sm-4 { width: 33.33333333% !important; }
td.col-sm-5 { width: 41.66666667% !important; }
td.col-sm-6 { width: 50% !important; }
td.col-sm-7 { width: 58.33333333% !important; }
td.col-sm-8 { width: 66.66666667% !important; }
td.col-sm-9 { width: 75% !important; }
td.col-sm-10 { width: 83.33333333% !important; }
td.col-sm-11 { width: 91.66666667% !important; }
td.col-sm-12 { width: 100% !important; }

td.col-lg-1 { width: 8.33333333% !important; }
td.col-lg-2 { width: 16.66666667% !important; }
td.col-lg-3 { width: 25% !important; }
td.col-lg-4 { width: 33.33333333% !important; }
td.col-lg-5 { width: 41.66666667% !important; }
td.col-lg-6 { width: 50% !important; }
td.col-lg-7 { width: 58.33333333% !important; }
td.col-lg-8 { width: 66.66666667% !important; }
td.col-lg-9 { width: 75% !important; }
td.col-lg-10 { width: 83.33333333% !important; }
td.col-lg-11 { width: 91.66666667% !important; }
td.col-lg-12 { width: 100% !important; }

/* テーブルの基本スタイル強化 */
table {
    table-layout: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
    background-color: transparent !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

table th,
table td {
    padding: 8px !important;
    line-height: 1.42857143 !important;
    vertical-align: middle !important;
    border-top: 1px solid #ddd !important;
}

table th {
    border-bottom: 2px solid #ddd !important;
    text-align: center !important;
    font-weight: bold !important;
    background-color: #f5f5f5 !important;
    color: #333 !important;
}

/* テーブル内の要素の調整 */
table .form-control {
    width: 100% !important;
    margin-bottom: 0 !important;
}

table .btn {
    margin: 0 2px !important;
}

table .input-group {
    width: auto !important;
}

/* テーブルヘッダーのテキスト配置 */
th.text-left {
    text-align: left !important;
}

th.text-center {
    text-align: center !important;
}

th.text-right {
    text-align: right !important;
}

/* テーブルセルのテキスト配置 */
td.text-left {
    text-align: left !important;
}

td.text-center {
    text-align: center !important;
}

td.text-right {
    text-align: right !important;
} 