/* 全局样式 */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.navbar {
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.container {
    max-width: 100%;
}

.content>.container {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px 0 rgba(116, 79, 168, 0.35);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    box-shadow: 0 6px 20px 0 rgba(116, 79, 168, 0.5);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    box-shadow: 0 4px 15px 0 rgba(17, 153, 142, 0.35);
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #0d7e75 0%, #2dd168 100%);
    box-shadow: 0 6px 20px 0 rgba(17, 153, 142, 0.5);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px 0 rgba(245, 87, 108, 0.35);
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d67fe6 0%, #dc4456 100%);
    box-shadow: 0 6px 20px 0 rgba(245, 87, 108, 0.5);
    transform: translateY(-2px);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px 0 rgba(250, 112, 154, 0.35);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e85d87 0%, #ecc72d 100%);
    box-shadow: 0 6px 20px 0 rgba(250, 112, 154, 0.5);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px 0 rgba(108, 117, 125, 0.25);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #4e555b 100%);
    box-shadow: 0 6px 20px 0 rgba(108, 117, 125, 0.35);
    transform: translateY(-2px);
    color: white;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-sm {
    font-size: 13px;
    padding: 6px 14px;
}

/* 表格样式 */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    background: white;
    margin-bottom: 0;
    font-size: 13px;
}

.table thead th {
    background: #f8f9fa;
    color: #374151;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 12px;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

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

.table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

/* Badge样式 */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 6px;
    font-size: 12px;
}

.bg-success-subtle {
    background-color: #d1f4e0 !important;
}

.text-success {
    color: #11998e !important;
}

.bg-danger-subtle {
    background-color: #ffe0e0 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.footer {
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #6b7280;
    font-size: 14px;
}

.footer-divider {
    color: #d1d5db;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.dropdown-menu {
    font-size: 0.95rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
}

/* 布局 */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.sidebar .brand {
    padding: 24px 20px;
    font-size: 20px;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 0.5px;
}

.menu {
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    flex: 1;
}

.menu-item {
    color: #d1d5db;
    text-decoration: none;
    padding: 14px 18px;
    border-radius: 10px;
    margin: 6px 0;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(102, 126, 234, 0.15);
    color: #fff;
    transform: translateX(5px);
}

.menu-item:hover::before,
.menu-item.active::before {
    transform: scaleY(1);
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    color: #d1d5db;
    font-size: 14px;
}

.user-info i {
    font-size: 20px;
    color: #667eea;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(246, 247, 251, 0.95);
}

.topbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.topbar .title {
    font-weight: 700;
    font-size: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-time {
    color: #6b7280;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.content {
    padding: 20px;
    flex: 1;
}

/* 卡片样式 */
.card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 10px;
    background: white;
    overflow: hidden;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: #f8f9fa;
    color: #374151;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 14px;
}

.card-body {
    background: #fff;
    padding: 16px;
}

.card.border-danger .card-header {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* 表单控件样式 */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    transition: all 0.2s ease;
    font-size: 13px;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.form-select-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Alert样式 */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
}

.alert-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: #0369a1;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

/* 分页样式 */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 4px;
    border: 2px solid #e5e7eb;
    color: #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.pagination .page-item.disabled .page-link {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #9ca3af;
}

/* Modal样式 */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    border: none;
    padding: 20px 24px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 700;
    font-size: 18px;
}

.modal-body {
    padding: 28px 24px;
}

.modal-footer {
    border: none;
    padding: 16px 24px 20px;
    background: #f9fafb;
}

/* 登录页面特殊样式 */
.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 {
    max-width: 480px;
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

.login-header {
    text-align: center;
    padding: 32px 24px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 2s ease infinite;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.login-subtitle {
    font-size: 14px;
    margin-top: 8px;
    opacity: 0.9;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .topbar {
        padding: 0 16px;
    }

    .content {
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }
}