/* 蒙太奇设计系统 - 简洁专业版 */

:root {

    --primary-color: #00b894;
    --secondary-color: #00a085;
    --success-color: #27ae60;    /* 稍微柔和的绿色 */
    --warning-color: #f39c12;    /* 稍微柔和的橙色 */
    --danger-color: #e74c3c;     /* 稍微柔和的红色 */

    /* 灰度系统 */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 1. 卡片组件规范 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card-elevated {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 2. 按钮组件规范 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: rgba(74, 144, 226, 0.05);
}

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

/* 3. 输入框规范 */
.input {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 4. 标签/徽章规范 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

/* 5. 进度条规范 */
.progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 6. 表格规范 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
}

/* 7. 列表规范 */
.list {
    list-style: none;
    padding: 0;
}

.list-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.2s ease;
}

.list-item:hover {
    background: var(--gray-50);
}

/* 8. 导航链接规范 */
a {
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.nav-link.active {
    background: rgba(74, 144, 226, 0.08);
    color: var(--primary-color);
}

/* 9. 下拉菜单规范 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.2s ease;
    gap: 10px;
}

.dropdown-item:hover {
    background: var(--gray-50);
}

/* 10. 模态框规范 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* 11. 动画规范 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 12. 自定义滚动条 */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* 13. 移动端菜单相关样式 */
#mobileMenu .mobile-menu-item {
    cursor: pointer;
}

#mobileMenu .mobile-submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
}

#mobileMenu .mobile-submenu-link:hover {
    background: var(--gray-100);
}

#mobileMenu [id^="mobileSubmenu-"] {
    transition: all 0.3s ease;
    overflow: hidden;
}

#mobileMenu [id^="mobileSubmenu-"]:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

/* 旋转动画 */
.fa-chevron-right {
    transition: transform 0.3s ease;
}

.fa-chevron-right.rotate-90 {
    transform: rotate(90deg);
}

/* 14. 响应式断点 */
@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }
}

/* 15. 通用辅助类 */
.transition-all {
    transition: all 0.2s ease;
}

.cursor-pointer {
    cursor: pointer;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}