.content-wrapper{
    overflow: auto!important;
    height: calc(100dvh - 57px)!important;
    background-color: #f9f9f9!important;
}

.active{
    background-color: rgba(255, 255, 255, .1);
    color: #fff;
}

.search_form .form-group{
    display: flex!important;
    flex-direction: column!important;
    align-items: baseline!important;
    margin-top: 10px!important;
}

.search_form .form-group.checkbox{
    flex-direction:row!important;
    padding-top: 20px;
}

.search_form .form-group label{
    font-size: 14px!important;
}

.search_form .form-group.checkbox label{
    font-size: 16px!important;
}

.search_form button{
    margin-top: 30px!important;
}

.max_terminal_count{
    width: 50%!important;
}

.update_max_terminal_count_btn{
    margin-left: 10px!important;
    font-size: 12px!important;
}

.max_terminal_count_td{
    /* width: 15%!important; */
    display: flex!important;
}

.abnormal_csv_btn,
.terminal_regist_btn,
.regist_profile_type_btn,
.regist_model_btn {
    margin-bottom: 10px;
    margin-right: 10px;
}

.table td{
    vertical-align: middle!important;
}

input[type=checkbox].toggle{
    --size:24px;
    appearance:none;-webkit-appearance:none;
    outline:none;
    display:inline-block;
    width:calc(var(--size)*1.62);
    height:var(--size);
    border-radius:calc(var(--size)*.5);
    vertical-align:middle;
    background-color:#666;
    transition:.1s;
}
input[type=checkbox].toggle::before{
    content:"";
    display:block;width:var(--size);height:var(--size);
    border-radius:50%;
    transform:scale(.85);
    background-color:#fff;
    transition:inherit;
}
input[type=checkbox]:checked.toggle{
    background-color:#007bff;
}
input[type=checkbox]:checked.toggle::before{
    transform:translateX(calc(var(--size)*.62))scale(.85);
}

.progress-bar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

body.sidebar-collapse .main-sidebar {
    pointer-events: none; /* クリックイベントを無効化 */
}

/* サイドバーが閉じているときでも閉じるボタンは有効 */
body.sidebar-collapse .nav-item {
    pointer-events: auto; /* ボタンのクリックを有効化 */
}

.sidebar-logo{
    width: 50px!important;
    height: 50px!important;
    margin-left: .10rem!important;
    margin-top: -10px!important;
    max-height: 50px!important;
}

.login{
    margin-top: -100px!important;
    background-color: #FFFFFF!important;
}

.login-logo-img{
    width: 300px!important;
}

[class*=sidebar-dark-] .nav-treeview>.nav-item>.nav-link.active, [class*=sidebar-dark-] .nav-treeview>.nav-item>.nav-link.active:focus, [class*=sidebar-dark-] .nav-treeview>.nav-item>.nav-link.active:hover {
    background-color: #007bff!important;
    color: #fff!important;
}

.sidebar {
    max-height: calc(100dvh - (3.5rem + 1px))!important;
    height: calc(100dvh - (3.5rem + 1px))!important;
    overflow-y: auto!important;
    overflow-x: hidden!important;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

table tr th a,
table tr th{
    color: #212529!important;
}

.sortable-table thead th a {
    display: flex!important;
    justify-content: space-between!important;
}

.sortable-table thead th a span.sort-off {
    background-image: url(/static/images/sort_off-741a939f05b7d859217d62a449b08312.png)!important;
    cursor: pointer!important;
    /* background-position: right!important; */
    background-repeat: no-repeat!important;
    padding-right: 20px !important;
}

.sortable-table thead th a span.sort-asc {
    background-image: url(/static/images/sort_asc-1d177a9254c67ac91d0beeb73e9401d1.png)!important;
    cursor: pointer!important;
    /* background-position: right!important; */
    background-repeat: no-repeat!important;
    padding-right: 20px !important;
}

.sortable-table thead th a span.sort-desc {
    background-image: url(/static/images/sort_desc-b45df30766909706d4eccdcd24933a73.png)!important;
    cursor: pointer!important;
    background-position: right!important;
    /* background-repeat: no-repeat!important; */
    padding-right: 20px !important;
}

.profile_time,
.profile_time[readonly]{
    background-color: #FFFFFF!important;
    color: #000000!important;
}

.round_delete_btn {
    display: block;
    position: relative;
    width: 30px;
    height: 30px;
    border: 2px solid #FF0000;
    border-radius: 50%;
    background: #FF0000;
}

.round_delete_btn::before, .round_delete_btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px; 
    height: 22px;
    background: #FFFFFF;
}

.round_delete_btn::before {
    transform: translate(-50%,-50%) rotate(45deg);
}

.round_delete_btn::after {
    transform: translate(-50%,-50%) rotate(-45deg);
}

.round_delete_btn_wrap{
    display: flex;
    align-items: center;
}

  
.round_add_btn {
    display: block;
    position: relative;
    width: 30px;
    height: 30px;
    border: 2px solid #007bff;
    border-radius: 50%;
    background: #007bff;
    margin-top: 50px;
}

.round_add_btn::before, .round_add_btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px; 
    height: 22px;
    background: #FFFFFF;
}

.round_add_btn::before {
    transform: translate(-50%,-50%) rotate(-90deg);
}

.round_add_btn::after {
    transform: translate(-50%,-50%);
}

.round_add_btn_wrap{
    display: flex;
    justify-content: center;
}

.random-check-group{
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.fc-day-today {
    background-color: transparent !important;
    color: inherit !important;
}

.fc-timegrid-event-short .fc-event-time:after {
    content: ''!important;
}

.fc-event-delete {
    line-height: 0.6!important;
    color: #FFFFFF !important;
    font-size: 20px !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

.fc-event-main{
    display: flex!important;
    justify-content: space-between!important;
    padding: 0 10px;
}

.legend-btn.active {
    box-shadow: 0 0 0 2px #333!important;
    border-width: 2px!important;
    opacity: 1!important;
    filter: brightness(1.1)!important;
}

.text-black {
    color: #212529!important;
}

.color-legend .low {
    background-color:#28a745!important; 
    color:#fff!important;
}

.color-legend .middle {
    background-color:#007bff!important; 
    color:#fff!important;
}

.color-legend .high {
    background-color:#dc3545!important; 
    color:#fff!important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #ced4da!important;
    padding: .46875rem .75rem!important;
    height: calc(2.25rem + 2px)!important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    margin-top: 0!important;
}

/* .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 0!important;
    padding-right: 0!important;
} */

.nav .nav-item {
    font-size: 14px!important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #007bff!important;
    border: 1px solid #007bff!important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border-right: 1px solid #007bff!important;
    color: #fff!important;
    margin-left: 0!important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{
    background-color: #007bff!important;
}

#globalErrorList {
    margin-bottom: 0;
    padding-inline-start: 20px;
}

.timeline-container {
    overflow-x: auto;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    max-height: 70vh;
}

.timeline-wrapper {
    position: relative;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: visible;
    width: 1560px;
}

.time-header {
    display: flex;
    background: white;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #e9ecef;
    width: 1560px;
    flex-shrink: 0;
}

.time-labels-container {
    display: flex;
    width: 1440px;
    flex-shrink: 0;
}

.time-label {
    flex: 1;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    background: white;
    position: relative;
    box-sizing: border-box;
}

.time-label:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #dee2e6;
}

.time-label.major {
    background: white;
    font-weight: 700;
    font-size: 15px;
    color: #343a40;
    border-right: 2px solid #adb5bd;
}

.time-label:last-child {
    border-right: none;
}

.time-label.major::after {
    height: 12px;
    width: 3px;
    background: #495057;
}

.terminal-header {
    width: 120px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    background: white;
    border-right: 1px solid #adb5bd;
    left: 0;
    z-index: 102;
}

.terminal-row {
    display: flex;
    min-height: 50px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    background: white;
    width: 1560px;
    flex-shrink: 0;
}

.terminal-row:nth-child(even) {
    background: #f8f9fa;
}

.terminal-row:nth-child(even) .terminal-name-cell {
    background: white;
}

.terminal-name-cell {
    width: 120px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    background: white;
    border-right: 1px solid #adb5bd;
    left: 0;
    z-index: 11;
    flex-shrink: 0;
}

.timeline-track {
    width: 1440px;
    /* 24時間 × 60px */
    height: 50px;
    position: relative;
    background: inherit;
    flex-shrink: 0;
}

.time-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e9ecef;
}

.grid-line.major {
    background: #dee2e6;
    width: 2px;
}

.current-time-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dc3545;
    z-index: 50;
}

.watch-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.watch-session.crosses-date {
    background: #fd7e14;
}

.watch-session {
    position: absolute;
    height: 32px;
    top: 9px;
    background: #17a2b8;
    border-radius: 8px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.watch-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.watch-session.crosses-date {
    background: #fd7e14;
}

.watch-session.watching {
    background: #dc3545;
    border: 2px solid #ff6b6b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.tooltip-custom {
    position: absolute;
    background: rgba(33, 37, 41, 0.95);
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-data-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* 日付ナビゲーションのスタイル */
#prevDateBtn,
#nextDateBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#prevDateBtn:hover,
#nextDateBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

#currentDateDisplay {
    font-weight: 600;
    color: #495057;
    min-width: 200px;
    text-align: center;
}