/* ========================================
   佰医互联 HIS系统 - 菜单列表页面美化样式
   ======================================== */

/* ========== 页面头部工具栏 ========== */
.menu-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.menu-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 面包屑导航 */
.menu-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-size: 14px;
}

.menu-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.menu-breadcrumb-item:hover {
    color: #3b82f6;
}

.menu-breadcrumb-item.active {
    color: #1e40af;
    font-weight: 600;
}

.menu-breadcrumb-separator {
    color: #cbd5e1;
    font-size: 12px;
}

/* ========== 按钮样式 ========== */
.btn-menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-menu-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-menu-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.btn-menu-secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-menu-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
}

.btn-menu-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-menu-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.btn-menu-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-menu-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    color: #fff;
}

.btn-menu-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-menu-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    color: #fff;
}

.btn-menu-info {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-menu-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    color: #fff;
}

/* 小按钮 */
.btn-menu-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
}

/* 图标按钮 */
.btn-menu-icon {
    padding: 8px;
    border-radius: 8px;
}

/* ========== 表格容器 ========== */
.menu-table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* ========== 表格样式 ========== */
.menu-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.menu-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.menu-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.menu-table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.menu-table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.menu-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.menu-table tbody tr:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.menu-table tbody tr:last-child {
    border-bottom: none;
}

.menu-table tbody td {
    padding: 16px 20px;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

/* 名称列样式 */
.menu-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-name-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 8px;
    color: #4f46e5;
    font-size: 16px;
    transition: all 0.2s ease;
}

.menu-table tbody tr:hover .menu-name-icon {
    background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
    transform: scale(1.05);
}

.menu-name-text {
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.menu-name-text:hover {
    color: #3b82f6;
}

/* 子菜单数量徽章 */
.menu-child-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 12px;
    color: #64748b;
    margin-left: 8px;
}

/* 模块标签 */
.menu-module-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.menu-module-admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.menu-module-doctor {
    background: #dcfce7;
    color: #15803d;
}

.menu-module-organization {
    background: #fef3c7;
    color: #b45309;
}

/* 状态标签 */
.menu-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.menu-status-enabled {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #15803d;
}

.menu-status-enabled::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

.menu-status-disabled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
}

.menu-status-disabled::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
}

/* 隐藏状态标签 */
.menu-hide-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.menu-hide-yes {
    background: #fef3c7;
    color: #b45309;
}

.menu-hide-no {
    background: #f1f5f9;
    color: #64748b;
}

/* 排序值 */
.menu-sort-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

/* URL显示 */
.menu-url-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 4px;
}

/* 操作按钮组 */
.menu-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.menu-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.menu-action-btn-view {
    background: #f1f5f9;
    color: #475569;
}

.menu-action-btn-view:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.menu-action-btn-edit {
    background: #fef3c7;
    color: #b45309;
}

.menu-action-btn-edit:hover {
    background: #fde68a;
    color: #92400e;
}

.menu-action-btn-delete {
    background: #fee2e2;
    color: #b91c1c;
}

.menu-action-btn-delete:hover {
    background: #fecaca;
    color: #991b1b;
}

/* ========== 空状态 ========== */
.menu-empty-state {
    padding: 60px 20px;
    text-align: center;
}

.menu-empty-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.menu-empty-text {
    font-size: 15px;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* ========== 分页样式 ========== */
.menu-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
}

.menu-pagination .pagination {
    display: flex;
    gap: 4px;
    margin: 0;
}

.menu-pagination .pagination > li > a,
.menu-pagination .pagination > li > span {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    background: #fff;
    transition: all 0.2s ease;
}

.menu-pagination .pagination > li > a:hover {
    background: #e0e7ff;
    color: #4f46e5;
}

.menu-pagination .pagination > .active > a,
.menu-pagination .pagination > .active > span {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
}

/* ========== 统计卡片 ========== */
.menu-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.menu-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.menu-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.menu-stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 22px;
}

.menu-stat-icon.total {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.menu-stat-icon.enabled {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.menu-stat-icon.disabled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.menu-stat-icon.hidden {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.menu-stat-info h4 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.menu-stat-info p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* ========== 搜索框 ========== */
.menu-search-box {
    position: relative;
    width: 280px;
}

.menu-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    background: #fff;
    transition: all 0.2s ease;
}

.menu-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.menu-search-input::placeholder {
    color: #94a3b8;
}

.menu-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* ========== 动画效果 ========== */
@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-table tbody tr {
    animation: fadeInUp 0.3s ease forwards;
}

.menu-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.menu-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.menu-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.menu-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.menu-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.menu-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.menu-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.menu-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.menu-table tbody tr:nth-child(9) { animation-delay: 0.45s; }
.menu-table tbody tr:nth-child(10) { animation-delay: 0.5s; }

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .menu-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .menu-toolbar-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .menu-search-box {
        width: 100%;
    }
    
    .menu-action-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .menu-table thead th,
    .menu-table tbody td {
        padding: 12px 15px;
    }
    
    .menu-name-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .menu-stats {
        grid-template-columns: 1fr;
    }
}

/* ========== 图标预览 ========== */
.menu-icon-preview {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 6px;
    color: #475569;
    font-size: 14px;
}
