* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    padding: 0;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, #ffffff 0%, #d2d6de 100%);
    font-family: 'Microsoft YaHei', sans-serif;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.margin-top{margin-top:15px;}
.margin-bottom{margin-bottom: 15px;}
.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease;
    margin: auto;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h3 {
    color: #333;
    font-weight: 300;
    font-size: 28px;
}

.login-header h3 span {
    color: #667eea;
    font-weight: 600;
}

.login-header p {
    color: #999;
    margin-top: 10px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group-custom {
    position: relative;
}
.form-select{
    line-height: 1.6;
}
.form-control {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding-left: 15px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    background-image: none;
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

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

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 10;
    font-size: 18px;
}

.btn-login {
    background: linear-gradient(135deg, #4b9cef 0%, #2080f7 100%);
    border: none;
    height: 50px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login i {
    font-size: 16px;
}

.remember-me {
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.remember-me label {
    color: #666;
    font-size: 14px;
    margin-left: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.copyright {
    text-align: center;
    padding: 20px;
    color: rgb(133, 133, 136);
    font-size: 13px;
    width: 100%;
    background: transparent;
    margin-top: auto;
}

/* 验证图标 */
.validation-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    display: none;
}

.is-valid ~ .validation-icon.valid-icon {
    display: block;
    color: #28a745;
}

.is-invalid ~ .validation-icon.invalid-icon {
    display: block;
    color: #dc3545;
}

/* Toastr 自定义样式 */
.toast-success {
    background-color: #51a351 !important;
}

.toast-error {
    background-color: #bd362f !important;
}

.toast-info {
    background-color: #2f96b4 !important;
}

.toast-warning {
    background-color: #f89406 !important;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 验证提示 */
.field-feedback {
    font-size: 12px;
    margin-top: 5px;
    padding-left: 45px;
}

.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.field-feedback {
    font-size: 12px;
    margin-top: 5px;
    padding-left: 0px;
}

.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* 侧边栏 - PC端默认显示 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* 侧边栏隐藏状态 - PC端 */
.sidebar.collapsed {
    left: -250px;
}

.sidebar-header {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #34495e;
    background: rgba(0,0,0,0.1);
}

.sidebar-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-header p {
    margin: 10px 0 0;
    color: #bdc3c7;
    font-size: 0.875rem;
    word-break: break-all;
}

.sidebar-menu {
    padding: 0 0;
}

.nav {
    flex-direction: column;
    width: 100%;
}

.nav-item {
    list-style: none;
    margin: 2px 0;
    width: 100%;
}

.nav-link {
    color: #ecf0f1;
    padding: 12px 20px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    background: #34495e;
    color: #fff;
    border-left-color: #3498db;
}

.nav-link.active {
    background: #34495e;
    color: #fff;
    border-left-color: #3498db;
    font-weight: 500;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link .arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 12px;
    flex-shrink: 0;
}

.nav-link .arrow.rotated {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding-left: 0px;
    display: none;
    background: rgba(0,0,0,0.1);
    width: 100%;
    text-indent: 20px;
}
.nav-link:focus,.nav-link:hover{
    color: #ecf0f1;
}
.nav-item.expanded > .submenu {
    display: block;
}

.submenu .nav-link {
    padding: 10px 15px;
    font-size: 0.9rem;
}

.submenu .nav-link i {
    font-size: 12px;
    width: 16px;
}

/* 主内容区 - PC端默认有左边距 */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 0;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    width: 100%;
}

/* 主内容区 - 侧边栏隐藏时 */
.main-content.expanded {
    margin-left: 0;
}

.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    padding: 15px 10px;
    border-radius: 0;
    margin: 0;
    width: 100%;
}

#sidebarToggle {
    cursor: pointer;
    transition: all 0.3s;
    z-index: 800;
}

#sidebarToggle:hover {
    background-color: #e9ecef;
}

.content-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    padding: 25px;
    margin: 20px;
}

.page-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.page-title h4 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 移动端侧边栏默认隐藏 */
    .sidebar {
        left: -250px;
    }

    /* 移动端侧边栏显示 */
    .sidebar.mobile-visible {
        left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }

    .main-content {
        margin-left: 0;
    }

    /* 移动端主内容区不需要偏移 */
    .main-content.mobile-shifted {
        margin-left: 0;
    }

    .navbar {
        padding: 12px 5px;
    }

    .content-wrapper {
        padding: 15px;
        margin: 10px;
    }

    .table-responsive {
        margin-bottom: 0;
    }

    .table td, .table th {
        white-space: nowrap;
    }

    .btn-group-sm > .btn, .btn-sm {
        padding: 0.25rem 0.4rem;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 576px) {
    .content-wrapper {
        padding: 12px;
        margin: 8px;
    }

    .navbar .btn-link {
        font-size: 14px;
    }

    .navbar .btn-link i {
        font-size: 16px;
    }

    .page-title h4 {
        font-size: 18px;
    }

    .table {
        font-size: 13px;
    }

    .badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    .dropdown-menu {
        min-width: 200px;
    }
}

/* 滚动条美化 */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: #2c3e50;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #95a5a6;
    border-radius: 5px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #7f8c8d;
}

/* 统计卡片样式 */
.stat-card {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: 100%;
}

.stat-card .icon {
    font-size: 48px;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 20px;
}

.stat-card .title {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
}

/* 表格样式优化 */
.table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #f8f9fa;
}

/* 按钮样式优化 */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* 徽章样式 */
.badge {
    padding: 5px 8px;
    font-weight: 500;
}

/* 表单样式优化 */
.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    height: auto;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
}

.card-header h5 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* 遮罩层 - 移动端显示侧边栏时 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* 版权信息区域 */
.footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    padding: 15px 20px;
    color: #6c757d;
    font-size: 14px;
    margin-top: auto;
}
/* 微信扫码登录按钮 - 右上角 */
.qr-login-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.qr-login-icon img {
    width: 80px;
    height: auto;

}

/* 模态框样式 */
.qr-modal-content {
    text-align: center;
    padding: 10px 0;
}

.qr-modal-content .qr-container {
    border-radius: 12px;
    padding: 20px;
    position: relative;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-modal-content .qr-container img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    border: 10px solid #fff;
    box-shadow: 0 4px 10px rgba(117, 121, 119, 0.4);
}

.qr-modal-content .qr-status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.qr-modal-content .qr-status-overlay .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.qr-modal-content .qr-status-overlay .icon.success {
    color: #28a745;
}

.qr-modal-content .qr-status-overlay .icon.error {
    color: #dc3545;
}

.qr-modal-content .qr-status-overlay .icon.loading {
    color: #07c160;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.qr-modal-content .qr-tips {
    color: #999;
    font-size: 13px;
    margin-top: 15px;
}

.qr-modal-content .qr-tips i {
    color: #07c160;
}

.modal-header .modal-title i {
    color: #07c160;
}
