/* ȫ����ʽ */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
    --header-height: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    margin: 0;
    padding: 0;
}

/* ��������ʽ */
.navbar {
    height: var(--header-height);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1030;
}


/* �������ʽ */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1020;
}

    .sidebar.collapsed {
        margin-left: calc(-1 * var(--sidebar-width));
    }

.sidebar-nav {
    padding: 20px 0;
}

    .sidebar-nav .nav-link {
        color: rgba(255, 255, 255, 0.8);
        padding: 12px 20px;
        margin: 2px 10px;
        border-radius: 8px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
    }

        .sidebar-nav .nav-link:hover,
        .sidebar-nav .nav-link.active {
            color: white;
            background-color: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }

        .sidebar-nav .nav-link i {
            width: 20px;
            margin-right: 10px;
            text-align: center;
        }

/* ���������� */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    /*padding: 20px;*/
    min-height: calc(100vh - var(--header-height));
    transition: all 0.3s ease;
    overflow-x: hidden; /* ���غ�������� */
}

    .main-content.expanded {
        margin-left: 70px;
    }

/* iframe�������� */
.iframe-container {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height) - 42px); /* ��ȥtab�߶� */
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contentFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* �Ӳ˵���ʽ */
.has-submenu > .submenu {
    display: none;
}

.has-submenu.active > .submenu {
    display: block;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.1);
}

    .submenu .submenu-link {
        padding: 10px 20px 10px 40px !important;
        font-size: 0.9rem;
    }

.submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

/* ҳ��ͷ�� */
.page-header {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.page-subtitle {
    color: var(--secondary-color);
    margin-bottom: 0;
}


/* ͳ�ƿ�Ƭ */
.stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

    .stat-card:hover {
        transform: translateY(-5px);
    }

    .stat-card .stat-icon {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
        margin-bottom: 15px;
    }

    .stat-card .stat-number {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .stat-card .stat-label {
        color: var(--secondary-color);
        font-size: 0.9rem;
    }

/* �����ʽ */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table {
    margin-bottom: 0;
}

    .table thead th {
        background-color: var(--light-color);
        border-bottom: 2px solid #dee2e6;
        font-weight: 600;
        color: var(--dark-color);
        padding: 15px;
    }

    .table tbody td {
        padding: 15px;
        vertical-align: middle;
    }

    .table tbody tr:hover {
        background-color: rgba(0,123,255,0.05);
    }

/* ��ť��ʽ */
.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* ����ʽ */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
    }

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* ������ʽ */
.badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 20px;
}

/* �û�ͷ�� */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.user-avatar-lg {
    width: 80px;
    height: 80px;
}

/* ������ */
.search-box {
    position: relative;
}

    .search-box .form-control {
        padding-left: 40px;
    }

    .search-box .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--secondary-color);
    }

/* ������ */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* ���ض��� */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ֪ͨ��ʽ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ��Ӧʽ��� */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

        .sidebar.show {
            margin-left: 0;
        }

    .main-content {
        margin-left: 0;
    }

    .page-header {
        padding: 15px;
    }

    .content-card {
        padding: 15px;
    }

    .stat-card {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
}

/* �Զ�������� */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.5);
    }

/* ����Ч�� */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* ������ʾ */
.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 6px;
}

/* ģ̬�� */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 20px;
}

/* ������ */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 4px;
}

/* �б��� */
.list-group-item {
    border: none;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
}

    .list-group-item:last-child {
        border-bottom: none;
    }

    .list-group-item:hover {
        background-color: rgba(0,123,255,0.05);
    }

/* ������ǩ */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    display: flex;
    flex-wrap: nowrap;
    scrollbar-width: none; /* Firefox */
}

    .nav-tabs::-webkit-scrollbar {
        display: none; /* Chrome Safari */
    }

    .nav-tabs .nav-item {
        flex-shrink: 0;
    }

    .nav-tabs .nav-link {
        border: none;
        border-bottom: 2px solid transparent;
        color: var(--secondary-color);
        font-weight: 500;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .nav-tabs .nav-link:hover {
            border-bottom-color: var(--primary-color);
            color: var(--primary-color);
        }

        .nav-tabs .nav-link.active {
            border-bottom-color: var(--primary-color);
            color: var(--primary-color);
        }

/* Tabҳ�رհ�ť */
.tab-close {
    font-weight: bold;
    color: #999;
    padding: 0 5px;
    margin-left: 5px;
    margin-right:-10px;
}

    .tab-close:hover {
        color: #dc3545;
        background-color: rgba(220, 53, 69, 0.1);
        border-radius: 50%;
    }

/* ���м���� */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

/* ��ҳ */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    padding: 8px 12px;
}

    .page-link:hover {
        background-color: var(--light-color);
        border-color: var(--primary-color);
    }

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* �����˵� */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s ease;
}

    .dropdown-item:hover {
        background-color: var(--light-color);
        color: var(--primary-color);
    }

/* ������ */
.input-group-text {
    background-color: var(--light-color);
    border: 1px solid #dee2e6;
    color: var(--secondary-color);
}

/* ��Ƭ */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ����� */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* ʱ������ʽ */
.timeline {
    position: relative;
    padding-left: 30px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: #dee2e6;
    }

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* ��״̬ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

    .empty-state i {
        font-size: 4rem;
        margin-bottom: 20px;
        opacity: 0.5;
    }

    .empty-state h5 {
        margin-bottom: 10px;
        color: var(--dark-color);
    }

/* ����״̬ */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

    .loading-state .spinner-border {
        width: 3rem;
        height: 3rem;
        margin-bottom: 20px;
    }

/* ����״̬ */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--danger-color);
}

    .error-state i {
        font-size: 4rem;
        margin-bottom: 20px;
        opacity: 0.7;
    }

/* �ɹ�״̬ */
.success-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--success-color);
}

    .success-state i {
        font-size: 4rem;
        margin-bottom: 20px;
    }

/* ��ӡ��ʽ */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .page-header .d-flex > div:last-child {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }

    .content-card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* ��ɫģʽ֧�� */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #2c3e50;
        --dark-color: #ecf0f1;
    }

    body {
        background-color: #1a1a1a;
        color: #ecf0f1;
    }

    .content-card,
    .stat-card,
    .card {
        background-color: #2c3e50;
        color: #ecf0f1;
    }

    .table {
        color: #ecf0f1;
    }

        .table thead th {
            background-color: #34495e;
            color: #ecf0f1;
        }

    .form-control {
        background-color: #34495e;
        border-color: #4a5568;
        color: #ecf0f1;
    }

        .form-control:focus {
            background-color: #34495e;
            border-color: var(--primary-color);
            color: #ecf0f1;
        }
}

/* Header */
.navbar-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: var(--header-height);
}

.navbar-brand {
    color: white !important;
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
}

    .navbar-nav .nav-link:hover {
        color: white !important;
    }

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: #343a40;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}


.sidebar-nav {
    padding: 0;
    margin: 0;
    list-style: none;
}

    .sidebar-nav li {
        border-bottom: 1px solid #495057;
    }

        .sidebar-nav li a {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            color: #adb5bd;
            text-decoration: none;
            transition: all 0.3s;
        }

            .sidebar-nav li a:hover,
            .sidebar-nav li a.active {
                background-color: #495057;
                color: #fff;
            }

            .sidebar-nav li a i {
                width: 20px;
                margin-right: 10px;
                text-align: center;
            }

.sidebar.collapsed .sidebar-nav li a span {
    display: none;
}

.sidebar.collapsed .sidebar-nav li a {
    justify-content: center;
    padding: 15px 10px;
}

    .sidebar.collapsed .sidebar-nav li a i {
        margin-right: 0;
    }


/* Content Card */
.content-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    margin-bottom: 10px;
}



/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        transform: translateY(-1px);
    }

/* Tables */
.table {
    background: white;
}

    .table th {
        background-color: #f8f9fa;
        border-top: none;
        font-weight: 600;
        color: #495057;
    }

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
}

/* Toggle Button */
.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0 10px;
}

    .sidebar-toggle:hover {
        color: #f8f9fa;
    }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
    }

        .main-content.expanded {
            margin-left: 0;
        }
}

/* console Cards */
.console-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

    .console-card:hover {
        transform: translateY(-2px);
    }

    .console-card .card-icon {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
    }

    .console-card.primary .card-icon {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .console-card.success .card-icon {
        background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    }

    .console-card.warning .card-icon {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }

    .console-card.info .card-icon {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    }