:root {
    --primary-color: #2c80ff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --light-bg: #f8f9fa;
    --orange-color: #ff8c00;
}

body {
    background-color: #f5f7fb;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

/* 文本颜色工具类 */
.text-orange {
    color: var(--orange-color) !important;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), #1a5fd6);
    color: white;
    padding: 1.5rem 0;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #eaeaea;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 128, 255, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #1a5fd6;
}

.file-upload-area {
    border: 2px dashed #d1d8e0;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #eaeaea;
}

.file-item i {
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.file-item .file-name {
    flex: 1;
}

.file-item .file-size {
    color: #999;
    font-size: 0.85rem;
    margin-right: 1rem;
}

.file-item .remove-file {
    color: #dc3545;
    cursor: pointer;
}

.progress {
    height: 8px;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background-color: #f5f7fb;
    padding: 0 10px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.step.active .step-number {
    background-color: var(--primary-color);
}

.step.completed .step-number {
    background-color: var(--success-color);
}

.step-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.application-status {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.application-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.application-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.application-preview {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.application-preview .row {
    margin-bottom: 0.5rem;
}

.admin-sidebar {
    background-color: #2c3e50;
    color: white;
    min-height: 100vh;
    padding: 0;
}

.admin-sidebar .nav-link {
    color: #bdc3c7;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #34495e;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    color: white;
    background-color: #34495e;
}

.admin-sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* 二级菜单样式 */
.admin-sidebar .nav-item.has-submenu > .nav-link {
    position: relative;
}

.admin-sidebar .nav-item.has-submenu > .nav-link::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1.5rem;
    transition: transform 0.3s ease;
}

.admin-sidebar .nav-item.has-submenu.open > .nav-link::after {
    transform: rotate(180deg);
}

.admin-sidebar .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #1a252f;
}

.admin-sidebar .nav-item.has-submenu.open .submenu {
    max-height: 500px;
}

.admin-sidebar .submenu .nav-link {
    padding-left: 3.5rem;
    font-size: 0.9rem;
    border-bottom: none;
    border-left: 3px solid transparent;
}

.admin-sidebar .submenu .nav-link:hover,
.admin-sidebar .submenu .nav-link.active {
    border-left-color: var(--primary-color);
    background-color: #243342;
}

.admin-content {
    background-color: #f8f9fa;
    padding: 2rem;
    min-height: 100vh;
}

.stats-card {
    text-align: center;
    padding: 1.5rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--secondary-color);
}

.badge-pending {
    background-color: #ffc107;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-warning {
    background-color: #fd7e14;
    color: white;
}

.badge-approved {
    background-color: #28a745;
}

.badge-rejected {
    background-color: #dc3545;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #999;
    font-size: 14px;
}

.login-form .form-label {
    font-weight: 600;
    color: #555;
}

.login-btn {
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 用户管理页面 */
.user-card {
    border-left: 4px solid var(--primary-color);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1a5fd6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-super-admin {
    background-color: #dc3545;
    color: white;
}

.role-admin {
    background-color: #ffc107;
    color: #333;
}

.role-viewer {
    background-color: #17a2b8;
    color: white;
}

.status-active {
    color: #28a745;
}

.status-disabled {
    color: #dc3545;
}

.permission-tag {
    display: inline-block;
    background-color: #e9ecef;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin: 2px;
}

@media (max-width: 768px) {
    .step-label {
        font-size: 0.75rem;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    /* 移动端侧边栏样式 */
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .admin-sidebar.show {
        left: 0;
    }
    
    /* 遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* 主内容区域 */
    .admin-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 汉堡菜单按钮 */
    .navbar-toggler {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1060;
        background-color: #2c3e50;
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        color: white;
        cursor: pointer;
    }
    
    .navbar-toggler:focus {
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.5);
    }
    
    /* 表格响应式 */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    /* 统计卡片 */
    .stats-card {
        padding: 1rem;
    }
    
    .stats-number {
        font-size: 1.75rem;
    }
    
    /* 按钮组 */
    .btn-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-toolbar .btn {
        width: 100%;
    }
}

/* 系统设置页面优化 */
.settings-card .card-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.settings-card .card-header:hover {
    opacity: 0.9;
}

.settings-card .toggle-icon {
    transition: transform 0.3s ease;
}

.settings-card .toggle-icon.rotated {
    transform: rotate(180deg);
}

/* 配置状态徽章 */
.settings-card .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* 按钮间距优化 */
.d-flex.gap-2 {
    gap: 0.5rem;
}

/* 密码输入框样式 */
.input-group .btn-outline-secondary {
    border-color: #e0e0e0;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* 移动端系统设置优化 */
@media (max-width: 768px) {
    .settings-card .card-header h5 {
        font-size: 0.95rem;
    }

    .settings-card .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .d-flex.gap-2 {
        flex-direction: column;
        width: 100%;
    }

    .d-flex.gap-2 .btn {
        width: 100%;
    }

    .input-group {
        flex-wrap: nowrap;
    }

    .input-group textarea {
        resize: vertical;
    }
}
