﻿:root {
    --bb-header-color: #e0e0e0;
    --bb-header-bg: #002fa7;
}

.layout {
    --bb-layout-header-background: var(--bb-header-bg);
    --bb-layout-sidebar-banner-background: var(--bb-header-bg);
    --bb-layout-header-color: var(--bb-header-color);
    --bb-layout-title-color: var(--bb-header-color);
}

.layout-header {
    border-bottom: 1px solid var(--bs-border-color);
}

    .layout-header .widget {
        margin-right: 2rem;
    }

.layout-banner {
    border-bottom: 1px solid var(--bs-border-color);
}

    .layout-banner .layout-logo {
        border: 1px solid var(--bb-header-color);
    }

.layout-side {
    border-right: 1px solid var(--bs-border-color);
}

.layout-footer {
    border-top: 1px solid var(--bs-border-color);
}

.dropdown-logout {
    --bb-logout-text-color: var(--bb-header-color);
}

.logout-avatar {
    border-radius: 50%;
}

.dropdown-user img {
    border-radius: 50%;
}

.layout-drawer {
    padding: 6px;
    cursor: pointer;
}

.widget {
    --bb-widget-toggle-color: var(--bb-header-color);
}

    .widget .dropdown-menu {
        --bs-dropdown-min-width: 16rem;
    }

    .widget .dropdown-body h3 {
        color: #666666;
        font-size: 14px;
        margin-bottom: 10px;
    }

    .widget .dropdown-body h4 {
        color: #444444;
        font-size: 15px;
        margin: 0;
    }

    .widget .dropdown-body small {
        color: #999999;
        font-size: 10px;
        position: absolute;
        top: 0;
        right: 0;
    }

    .widget .dropdown-item {
        padding: 0.5rem 1rem;
        min-width: 100px;
    }

        .widget .dropdown-item > div:not(.progress):last-child {
            width: calc(100% - 40px);
        }

        .widget .dropdown-item.active,
        .widget .dropdown-item:active {
            color: inherit;
        }

        .widget .dropdown-item:not(:nth-of-type(odd)):active {
            background-color: inherit;
        }

    .widget .progress {
        height: 7px;
    }

.menu {
    --bb-menu-active-color: #002fa7;
    --bb-menu-bar-bg: #002fa7;
    --bb-menu-item-hover-bg: #002fa7;
    --bb-menu-item-hover-color: #fff;
}

/*自定义样式*/
:root {
    --bs-border-radius: 2px;
}

.table {
    --bs-table-bg: #F7F9F9;
}

tbody, td, tfoot, th, thead, tr {
    border-color: var(--bs-border-color);
}

.layout .layout-main {
    flex: 1 1 auto;
}

.form-inline > .form-row > * {
    display: flex;
}

.form-inline .form-label {
    text-align: right;
}

    .form-inline .form-label + * {
        width: calc(100% - var(--bs-row-label-width) - var(--bs-gutter-x));
        min-width: 10px
    }

.app-vbox {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: flex-start;
}

.app-vbox-fit {
    height: 100%
}

.app-vbox > .box-item {
    flex: 0 0 auto;
}

.app-vbox > .box-item-fit {
    flex: 1 1 auto;
    width: 100%;
    height: 100px;
    overflow: auto;
}

.app-hbox {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: flex-start;
}

.app-hbox-fit {
    width: 100%;
    height: 100%;
}

.app-hbox > .box-item {
    flex: 0 0 auto;
    height: 100%;
    overflow: auto;
}

.app-hbox > .box-item-fit {
    flex: 1 1 auto;
    width: 100px;
    height: 100%;
    overflow: auto;
}

.app-border {
    border-color: var(--bs-border-color);
    border-width: 1px;
    border-style: solid;
}

.flex-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

    .flex-toolbar > * {
        margin-bottom: 5px;
        margin-right:6px;
    }

        .flex-toolbar > *:first-child {
            margin-left: 0;
        }

        .flex-toolbar > *:last-child {
            margin-right: 0;
        }

.grid-btn {
    padding: 2px;
    line-height: 1;
}

    .grid-btn i {
        width: 1em
    }

@media (min-width: 768px) {
    .layout.is-page .layout-side {
        width: 150px;
    }

        .layout.is-page .layout-side.is-fixed-header.is-fixed-footer {
            height: calc(100vh - var(--bb-layout-header-height) - var(--bb-layout-footer-height));
            overflow: auto;
        }

            .layout.is-page .layout-side.is-fixed-header.is-fixed-footer .layout-menu {
                height: auto;
            }

        .layout.is-page .layout-side .menu.is-vertical {
            width: auto;
        }
}

.tabs.layout-tabs {
    height:100%;
}

.tabs.layout-tabs > .tabs-body {
    flex: 1 1 auto;
    height: 100px;
    padding: 0.5rem;
}

    .tabs.layout-tabs > .tabs-body > .tabs-body-content {
        height: 100%;
        height: 100%;
        width: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

.tabs-body-content .tabs-body-content {
    background-color: inherit;
}

.fit-height-modal .modal-content {
    height: 100%;
}

.fit-height-modal .modal-body {
    height: 100%;
}

.fit-height-modal .table-fixed-body {
    height: calc(100% - 40px);
}

.modal-table-fit .table-fixed-body {
    height: calc(100% - 39px);
}


.page-loading-mask {
    background-color: #fff;
    opacity: 0.6;
}

.modal {
    --bs-modal-title-line-height: 1.25;
}

.modal-header {
    padding: .25rem 1rem;
}

h5.modal-title {
    font-size:0.9rem;
    font-weight:bold;
}

.modal-footer {
    padding: .25rem 1rem;
}

.calendar-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px;
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.station-filter {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    background: white;
}

    .calendar th {
        background-color: #f5f5f5;
        padding: 10px;
        text-align: center;
    }

    .calendar td {
        border: 1px solid #e0e0e0;
        vertical-align: top;
        width: 14.28%;
        height: 120px;
        padding: 5px;
    }

.day-header {
    text-align: right;
    font-weight: bold;
    padding: 2px 5px;
    color: #555;
}

.shifts-container {
    font-size: 0.85em;
    overflow-y: auto;
    max-height: 85px;
}

.shift {
    margin-top: 4px;
    padding: 3px;
    border-radius: 3px;
    color: white;
}

    .shift.day-shift {
        background-color: #4caf50; /* 日班绿色 */
    }

    .shift.night-shift {
        background-color: #2196f3; /* 夜班蓝色 */
    }

    .shift.rest-shift {
        background-color: #9e9e9e; /* 休息灰色 */
    }

.user-name {
    font-weight: bold;
}

.shift-name {
    margin-left: 5px;
}

.no-shift {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 5px;
}

/* 地图相关样式 */
.station-marker {
    background: transparent !important;
    border: none !important;
}

.station-marker-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #002fa7;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .station-marker-inner:hover {
        transform: rotate(-45deg) scale(1.15);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        background-color: #0040d0;
    }

    .station-marker-inner i {
        transform: rotate(45deg);
        color: #fff;
        font-size: 20px;
    }

/* 车站弹出窗口样式 */
.station-popup {
    min-width: 200px;
}

.station-popup-title {
    font-size: 16px;
    font-weight: bold;
    color: #002fa7;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #002fa7;
}

.station-popup-info {
    font-size: 13px;
    color: #333;
}

    .station-popup-info div {
        margin: 4px 0;
        line-height: 1.5;
    }

        .station-popup-info div strong {
            color: #666;
            margin-right: 4px;
        }

/* Leaflet 弹出窗口自定义样式 */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-content {
    margin: 12px 16px;
    line-height: 1.4;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

/* 鼠标指针样式 */
.cursor-pointer {
    cursor: pointer;
}

/* 通知按钮样式 */
.notification-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: var(--bb-header-color);
}

    .notification-toggle:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(1.05);
    }

    .notification-toggle:active {
        transform: scale(0.95);
    }

    .notification-toggle .notification-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 10px;
        height: 10px;
        background-color: #ff4444;
        border-radius: 50%;
        border: 2px solid var(--bb-header-bg);
        animation: pulse-badge 2s infinite;
    }

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* 用户菜单悬停效果优化 */
.user-menu {
    position: relative;
}

    .user-menu .user-dropdown {
        display: block;
        animation: fadeInDown 0.2s ease-out;
    }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    left: auto;
    right: 1rem;
    bottom: 1rem;
    width: auto;
    max-width: min(480px, calc(100vw - 2rem));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message .alert {
    margin: 0.75rem 0 0 auto;
    max-width: min(480px, calc(100vw - 2rem));
}

.message .alert.show {
    top: auto;
    bottom: 0;
}
