/**
 * 121田径运动会编排管理系统 - 管理台统一样式
 * 专业、正式的管理台风格，全屏自适应布局
 */

:root {
    /* 主色调 - 专业蓝色系 */
    --primary-color: #1e3a5f;
    --primary-dark: #152a47;
    --primary-light: #2a4d7a;
    --secondary-color: #2563eb;
    --accent-color: #3b82f6;
    
    /* 侧边栏 - 稍深的灰色调 */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --sidebar-bg: #e9ecef;
    --sidebar-hover: #dee2e6;
    --sidebar-active: #e3f2fd;
    --sidebar-active-border: #2563eb;
    --sidebar-text: #1f2937;
    --sidebar-text-muted: #6b7280;
    --sidebar-border: #ced4da;
    
    /* 顶部栏 */
    --header-height: 64px;
    --header-bg: #ffffff;
    --header-border: #e5e7eb;
    
    /* 内容区 */
    --content-bg: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --border-radius: 8px;
    
    /* 文字颜色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* 状态颜色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* 过渡动画 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--content-bg);
    overflow-x: hidden;
}

/* 管理台布局容器 */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==================== 侧边栏样式 ==================== */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #e9ecef !important;
    color: #1f2937 !important;
    border-right: 1px solid #ced4da;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* 侧边栏头部 */
.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #ced4da;
    background: #e9ecef !important;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-logo:hover {
    color: #2563eb;
}

.sidebar-logo i {
    font-size: 24px;
    color: #2563eb;
}

.sidebar-logo-text {
    transition: opacity 0.3s;
}

/* 侧边栏导航 */
.sidebar-nav {
    padding: 16px 0;
}

.nav-section {
    margin-bottom: 28px;
}

.nav-section-title {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #374151 !important;
    margin-bottom: 12px;
    margin-top: 8px;
    cursor: pointer;
    border-bottom: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.nav-section-title:hover {
    color: #1f2937 !important;
    border-bottom-color: #2563eb;
    padding-left: 24px;
}

.nav-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 2px;
    margin-right: 4px;
}

.nav-section-title i {
    font-size: 16px;
    color: #2563eb;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-section-title:hover i {
    color: #1d4ed8;
    transform: scale(1.15);
}

.nav-item {
    margin: 4px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: #374151 !important;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    position: relative;
    font-weight: 500;
}

.nav-link:hover {
    background: #f3f4f6 !important;
    color: #2563eb !important;
    transform: translateX(4px);
    box-shadow: inset 3px 0 0 #2563eb;
}

.nav-link.active {
    background: #01847E !important;
    color: #E45A40 !important;
    font-weight: 600;
    border-left: 4px solid #01847E;
    box-shadow: inset 4px 0 0 #01847E;
}

.nav-link.active::before {
    display: none;
}

.nav-link i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    color: #6b7280;
    transition: all 0.25s ease;
}

.nav-link.active i {
    color: #E45A40;
    font-size: 17px;
}

.nav-link:hover i {
    color: #2563eb;
    transform: scale(1.1);
}

.nav-link-text {
    flex: 1;
    white-space: nowrap;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.nav-link small {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.nav-link.active small {
    color: #E45A40 !important;
    font-weight: 500;
}

.nav-badge {
    background: var(--danger-color);
    color: #ffffff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: auto;
}

/* 子菜单 */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 8px;
    border-left: 2px solid var(--sidebar-border);
    padding-left: 8px;
}

.nav-submenu.show {
    max-height: 1000px;
}

.nav-submenu .nav-link {
    padding: 10px 16px 10px 32px;
    font-size: 13px;
}

.nav-submenu .nav-link i {
    font-size: 14px;
}

/* ==================== 主内容区 ==================== */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* 顶部栏 */
.admin-header {
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-nav a:hover {
    color: var(--secondary-color);
}

.breadcrumb-nav .separator {
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
}

.header-action:hover {
    background: var(--content-bg);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--content-bg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: auto;
    width: auto;
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
    font-size: 12px;
}

.user-dropdown .dropdown-item:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.user-dropdown .dropdown-item:hover {
    background-color: var(--content-bg);
    color: var(--secondary-color);
}

.user-dropdown .dropdown-item i {
    font-size: 14px;
}

.user-dropdown .dropdown-divider {
    display: none;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* 内容区域 */
.admin-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* ==================== 卡片样式 ==================== */
.admin-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--secondary-color);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: #fafbfc;
}

/* ==================== 表格样式 ==================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f9fafb;
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--secondary-color);
    color: #ffffff;
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--content-bg);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.btn-success {
    background: var(--success-color);
    color: #ffffff;
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: #ffffff;
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* ==================== 徽章样式 ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #f3f4f6;
    color: #374151;
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.primary {
    background: #dbeafe;
    color: var(--secondary-color);
}

.stat-icon.success {
    background: #d1fae5;
    color: var(--success-color);
}

.stat-icon.warning {
    background: #fef3c7;
    color: var(--warning-color);
}

.stat-icon.info {
    background: #e0e7ff;
    color: var(--info-color);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-title {
        font-size: 18px;
    }
    
    .breadcrumb-nav {
        display: none;
    }
}

/* ==================== 侧边栏切换按钮 ==================== */
.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--content-bg);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ==================== 工具类 ==================== */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ==================== 表单样式 ==================== */
.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-control:disabled {
    background: #f3f4f6;
    color: var(--text-muted);
    cursor: not-allowed;
}

.invalid-feedback {
    font-size: 13px;
    margin-top: 4px;
    color: var(--danger-color);
}

.was-validated .form-control:invalid {
    border-color: var(--danger-color);
}

.was-validated .form-control:valid {
    border-color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
    font-weight: 600;
}

/* ==================== 步骤指引样式 ==================== */
.steps-guide-container {
    margin: 20px 0;
}

.steps-guide-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.steps-guide-header {
    text-align: center;
    margin-bottom: 20px;
}

.steps-guide-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.steps-guide-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.step-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.step-item:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.step-item.step-completed {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.step-item.step-completed .step-number {
    background: var(--success-color);
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
}

.step-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.step-arrow {
    color: var(--text-muted);
    font-size: 18px;
}

/* ==================== 移动端优化 ==================== */
@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        padding: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}



