/* 
   依诺射箭系统 - Tabler 对标核心设计系统 (Core Design System)
*/

:root {
    /* 0. 全局字号倍率控制 */

    /* 1. 颜色系统 (Color Tokens - 对标 Tabler) */
    --brand-blue: #206bc4;
    --brand-blue-hover: #1a569d;
    --brand-blue-soft: rgba(32, 107, 196, 0.06);
    --brand-gold: #f59f00;
    --brand-gold-soft: rgba(245, 159, 0, 0.1);
    --brand-red: #d63939;
    --brand-green: #2fb344;

    /* 中性色 (Neutral Tabler Theme Colors) */
    --bg-main: #f6f8fb;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #626976;
    --border-light: #e6e7e9;
    --border-strong: #d9dbde;

    /* Gradients */
    --gradient-sport: linear-gradient(135deg, #206bc4 0%, #4299e1 100%);
    --gradient-navy: linear-gradient(135deg, #1e293b 0%, #2f3e56 100%);
    --gradient-gold: linear-gradient(135deg, #f59f00 0%, #f7b500 100%);

    /* 2. 几何系统 (Geometry - 对标 Tabler) */
    --radius-xl: 8px;
    --radius-lg: 6px;
    --radius-md: 4px;
    --radius-sm: 2px;
    --radius-round: 999px;

    /* 3. 阴影系统 (Shadows) */
    --shadow-sm: 0 1px 3px rgba(30, 41, 59, 0.04);
    --shadow-md: 0 4px 6px rgba(30, 41, 59, 0.08);
    --shadow-lg: 0 12px 16px rgba(30, 41, 59, 0.12);

    /* 4. 响应式与中文排版 */
    --font-main: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
    --h1: 1.5rem;
    --h2: 1.25rem;
    --h3: 1rem;
    --body: 0.875rem;
    --small: 0.75rem;

    /* 5. 动画与交互 */
    --transition-base: all 0.15s ease-in-out;
    --transition-fast: all 0.1s ease-in-out;

    /* 向后兼容 */
    --archery-black: var(--text-main);
    --archery-blue: var(--brand-blue);
    --archery-gold: var(--brand-gold);
    --archery-red: var(--brand-red);
    --archery-white: #ffffff;
}

html {
    font-size: 16px;
}

/* 导航药丸 (Custom Pills) */
.custom-pills .nav-link {
    color: var(--text-main);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.custom-pills .nav-link.active {
    background: var(--brand-blue) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.custom-pills .nav-link:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
}

/* 时间轴 (Timeline) */
.m-timeline {
    position: relative;
    padding-left: 30px;
}

.m-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.m-timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.m-timeline-dot {
    position: absolute;
    left: -26px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-blue);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--brand-blue);
}

.m-timeline-dot.gold {
    background: var(--brand-gold);
    box-shadow: 0 0 0 2px var(--brand-gold);
}

/* 快捷操作按钮 (Quick Action Buttons) */
.m-quick-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition-base);
    border: 1.5px solid var(--border-light);
    flex: 1 1 160px;
}

.m-quick-btn:hover {
    border-color: var(--brand-blue);
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
    transform: translateY(-2px);
}

.m-quick-btn .m-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
}

.m-quick-btn:hover .m-icon {
    background: var(--brand-blue);
    color: white;
}

/* 移动端全宽按钮 */
@media (max-width: 576px) {
    .btn-mobile-full {
        width: 100%;
    }
}

/* 徽章 (Badges) */
.m-badge {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-round);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

.m-badge-blue {
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}

.m-badge-gold {
    background: var(--brand-gold-soft);
    color: var(--brand-gold);
}

.m-badge-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--brand-green);
}

/* 表单输入 (Inputs) */
.m-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-light);
    background: #fff;
    transition: var(--transition-fast);
    font-size: 15px;
}

.m-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px var(--brand-blue-soft);
}

/* 通用辅助类 */
.text-muted {
    color: var(--text-muted) !important;
}

.fw-black {
    font-weight: 900 !important;
}

.shadow-none {
    box-shadow: none !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* 打印优化 */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
    }
}

/* 下拉菜单增强 (Dropdown Enhancement) */
.nav-item.dropdown {
    position: relative !important;
}

.dropdown-menu {
    border-radius: var(--radius-lg) !important;
    padding: 0.5rem !important;
    animation: dropdownFadeIn 0.2s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.dropdown-item {
    border-radius: var(--radius-md) !important;
    transition: all 0.2s ease;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
}

.dropdown-item:hover {
    background: #f1f5f9 !important;
    transform: translateX(4px);
    color: var(--primary) !important;
}

/* 移除导致“蓝框”的默认焦点样式 */
.nav-link.dropdown-toggle:focus,
.nav-link.dropdown-toggle:active {
    outline: none !important;
    box-shadow: none !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Logo 放大适配 (Logo Scaling) */
@media (min-width: 769px) {
    .navbar {
        min-height: 96px !important;
        /* 进一步增加导航栏高度以容纳更大的 Logo */
    }

    .navbar-brand-image {
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
        margin-top: -2px;
        width: 96px !important;
        /* 容器放大到 96px */
        height: 96px !important;
        object-fit: contain !important;
        padding: 8px !important;
        /* 适度边距保证不贴边 */
        background: #fff !important;
        border-radius: 50% !important;
        border: none !important;
    }

    .navbar-brand:hover .navbar-brand-image {
        transform: scale(1.15) rotate(5deg);
        filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.15));
    }
}

/* ========================================================
   6. 统一设计系统化：提炼重构的通用组件类
   ======================================================== */

/* 极简无界高密度呼吸表格样式 */
.m-table,
.table,
.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.m-table th,
.table th,
.table-custom th {
    background: #FAF9F6 !important;
    color: var(--text-muted) !important;
    font-weight: 700;
    padding: 8px 12px !important;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    font-size: 12px !important;
    text-transform: uppercase;
}

.m-table td,
.table td,
.table-custom td {
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    font-size: 13px !important;
    color: var(--text-main) !important;
    vertical-align: middle;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.m-table tr,
.table tr,
.table-custom tr {
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.m-table tr:hover td,
.table tr:hover td,
.table-custom tr:hover td,
.m-table tr:hover,
.table tr:hover,
.table-custom tr:hover {
    background-color: rgba(255, 107, 0, 0.02) !important;
}

/* 控制舱分类容器与通用卡片 */
.category-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-left: 4px solid var(--brand-blue);
    padding-left: 10px;
}

.command-card {
    background: #fdfdfd;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-decoration: none !important;
    color: inherit;
    transition: var(--transition-base);
    height: 100%;
}

.command-card:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-blue);
}

.icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card-body-content {
    flex: 1;
    min-width: 0;
}

.card-title-text {
    font-weight: 800;
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.card-desc-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* 奖项名册及状态徽章 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 13px;
}

.rank-1 {
    background: linear-gradient(135deg, #fef08a 0%, #eab308 100%) !important;
    color: #713f12 !important;
    box-shadow: 0 2px 6px rgba(234, 179, 8, 0.2);
}

.rank-2 {
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%) !important;
    color: #334155 !important;
    box-shadow: 0 2px 6px rgba(148, 163, 184, 0.2);
}

.rank-3 {
    background: linear-gradient(135deg, #ffedd5 0%, #f97316 100%) !important;
    color: #7c2d12 !important;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.2);
}

.rank-other {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.target-badge {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    padding: 4px 10px;
    border-radius: var(--radius-round);
    font-family: monospace;
    font-weight: 700;
    font-size: 12px;
    display: inline-block;
}

/* ========================================================
   7. 赛程编排画布组件 (Schedule Canvas Layout & Cards)
   ======================================================== */
.m-workspace {
    display: flex;
    gap: 24px;
    padding: 30px;
    min-height: 100vh;
}

@media (min-width: 992px) {
    .main-content-admin .page-wrapper {
        overflow: hidden !important;
        height: calc(100vh - 60px) !important;
    }

    .m-workspace {
        padding: 20px 30px;
        height: 100%;
        min-height: 0 !important;
        overflow: hidden;
        gap: 24px;
    }

    .sidebar {
        width: 320px;
        flex-shrink: 0;
        position: static !important;
        height: 100% !important;
        max-height: none !important;
        overflow-y: auto;
        padding-right: 10px;
    }

    .main-content {
        flex: 1;
        height: 100%;
        overflow-y: auto;
        padding-right: 10px;
        min-width: 0;
    }
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.main-content {
    flex: 1;
}

.card-premium {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.preset-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preset-item {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: grab;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.preset-item:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: var(--brand-blue-soft);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.day-column {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.day-header {
    padding: 16px 24px;
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-list {
    min-height: 120px;
    padding: 16px;
    background: #fafafa;
}

.schedule-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    padding: 16px;
    transition: var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.schedule-item:hover {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-md);
}

/* Phase specific left border colors */
.border-INSPECTION {
    border-left: 5px solid #64748b !important;
}

.border-PRACTICE {
    border-left: 5px solid #06b6d4 !important;
}

.border-RANKING {
    border-left: 5px solid #10b981 !important;
}

.border-ELIMINATION {
    border-left: 5px solid #f97316 !important;
}

.border-FINALS {
    border-left: 5px solid #ef4444 !important;
}

.border-AWARD {
    border-left: 5px solid #fbbf24 !important;
}

.border-CEREMONY {
    border-left: 5px solid #8b5cf6 !important;
}

.border-PREP {
    border-left: 5px solid #3b82f6 !important;
}

.border-OTHER {
    border-left: 5px solid #94a3b8 !important;
}

.col-time-dur {
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.col-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.col-archery-specs {
    width: 340px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

.col-ops {
    width: 40px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.m-input-bold {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--brand-blue-soft) !important;
    border: 2px dashed var(--brand-blue) !important;
}

/* 奖牌榜获奖行样式 */
.winner-row {
    background-color: #f8fafc;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.winner-row:hover {
    background-color: #f1f5f9;
}

/* 适配双栏布局：防止绝对/固定定位高级控制台盖住左侧导航栏 */
@media (min-width: 992px) {
    .has-sidebar .page-wrapper {
        position: relative !important;
    }

    .has-sidebar .m-dashboard-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 10 !important;
    }

    .has-sidebar .m-elim-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 10 !important;
    }
}

/* ========================================================
   8. 赛程编排多端响应式与移动端交互样式 (Responsive Schedule UI/UX)
   ======================================================== */
@media (max-width: 991px) {
    .m-workspace {
        flex-direction: column !important;
        padding: 16px !important;
        gap: 16px !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
        padding-bottom: 90px !important;
        /* 给底部粘性栏留出空间 */
    }

    .sidebar {
        display: none !important;
        /* 隐藏默认侧边栏，改用抽屉模式 */
    }

    .main-content {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    .day-column {
        margin-bottom: 20px !important;
    }

    .day-header {
        padding: 12px 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .day-header>div {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .schedule-item {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 14px !important;
    }

    .col-time-dur,
    .col-main-info,
    .col-archery-specs,
    .col-ops {
        width: 100% !important;
        flex: none !important;
        align-items: stretch !important;
    }

    .col-time-dur {
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .col-time-dur>div {
        flex: 1 !important;
    }

    .col-archery-specs {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 10px !important;
    }

    .col-archery-specs>div {
        width: 100% !important;
    }

    .col-ops {
        border-top: 1px dashed var(--border-light);
        padding-top: 8px;
        flex-direction: row !important;
        justify-content: flex-end !important;
    }
}

/* 抽屉式容器 (Drawer Layout) */
.m-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 1060;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.m-drawer.show {
    transform: translateY(0);
}

.m-drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 移动端底部粘性控制栏 */
.mobile-sticky-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    padding: 12px 16px;
    z-index: 1040;
    display: none;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

@media (max-width: 991px) {
    .mobile-sticky-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
}

/* 公示日程滚动导航胶囊 */
.scroll-x-pills {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 4px 0;
}

.scroll-x-pills::-webkit-scrollbar {
    display: none;
}

.scroll-x-pills .day-tab {
    white-space: nowrap;
    flex-shrink: 0;
}

/* 编排画布移动端页签切换 */
.canvas-day-tabs {
    display: none;
    margin-bottom: 16px;
    background: #ffffff;
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

/* ========================================================
   9. 裁判成绩修改台全新 5.0 双端自适应 Studio 布局系统 (Admin Score Redesign)
   ======================================================== */

/* 字体与大容器 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&display=swap');

.m-studio-layout {
    display: flex;
    flex: 1;
    height: 100vh;
    overflow: hidden;
    background: #fafaf9;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 左侧折叠选手列表栏 */
.m-studio-sidebar {
    width: 320px;
    background: #ffffff;
    border-right: 1px solid #e5e5e0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.m-studio-sidebar.collapsed {
    width: 0;
    border-right: none;
}

/* 侧边栏内部元素 */
.m-sidebar-top-bar {
    padding: 16px;
    border-bottom: 1px solid #e5e5e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m-archer-cards-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #fafaf9;
}

.m-archer-card-item {
    padding: 14px;
    background: #ffffff;
    border: 1.5px solid #e5e5e0;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-archer-card-item:hover {
    border-color: var(--brand-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.m-archer-card-item.active {
    background: var(--brand-blue-soft) !important;
    border-color: var(--brand-blue) !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.1);
}

/* 主编辑区 */
.m-studio-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px;
    min-width: 0;
    background: #fcfcfb;
}

.m-studio-card-container {
    background: #ffffff;
    border: 1px solid #e5e5e0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
/* PC 端表格中的独立圆形箭值输入框 */
.score-input {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    border: 1.5px solid #cbd5e1 !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: block !important;
    outline: none !important;
    transition: all 0.15s ease-in-out !important;
    color: #1c1c1e !important;
    background-color: #ffffff !important;
}

.score-input:focus {
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.25) !important;
    background-color: #ffffff !important;
    color: #1c1c1e !important;
}

/* 颜色状态与背景 */
.score-input.val-10,
.score-input.val-X {
    background-color: #d90429 !important;
    color: #ffffff !important;
    border-color: #d90429 !important;
}

.score-input.val-9 {
    background-color: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

.score-input.val-8,
.score-input.val-7 {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}

.score-input.val-6,
.score-input.val-5 {
    background-color: #4b5563 !important;
    color: #ffffff !important;
    border-color: #4b5563 !important;
}

.score-input.val-M {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #cbd5e1 !important;
}

/* 三栏布局之右侧键盘区 */
.m-studio-keypad-sidebar {
    width: 280px;
    background: #ffffff;
    border-left: 1px solid #e5e5e0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
    overflow-y: auto;
}

/* 按钮键盘样式 */
.m-studio-keypad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.m-keypad-btn {
    height: 52px;
    border-radius: 12px;
    border: 1.5px solid #e5e5e0;
    background: #ffffff;
    color: #1c1c1e;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.m-keypad-btn:hover {
    background: #f5f5f4;
    border-color: #d6d6d0;
    transform: translateY(-1px);
}

.m-keypad-btn:active,
.m-keypad-btn.pressed {
    background: var(--brand-blue) !important;
    color: #ffffff !important;
    border-color: var(--brand-blue) !important;
    transform: scale(0.95);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.m-keypad-btn.val-X,
.m-keypad-btn.val-10 {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fca5a5;
}

.m-keypad-btn.val-9 {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

.m-keypad-btn.btn-action-back {
    grid-column: span 2;
    background: #f3f4f6;
    color: #4b5563;
}

.m-keypad-btn.btn-action-clear {
    grid-column: span 2;
    background: #fff5f5;
    color: #ef4444;
    border-color: #fee2e2;
}

/* 高对比度色彩徽章 */
.arrow-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    color: #374151;
}

.arrow-badge.val-X,
.arrow-badge.val-10 {
    background: linear-gradient(135deg, #ff5757 0%, #d90429 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(217, 4, 41, 0.3);
}

.arrow-badge.val-9 {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.arrow-badge.val-8,
.arrow-badge.val-7 {
    background: linear-gradient(135deg, #60a5fa 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
}

.arrow-badge.val-filled {
    background: #4b5563 !important;
    color: #ffffff !important;
    border: none !important;
}

.arrow-badge.val-M {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border: 1.5px solid #d1d5db !important;
}

/* PC/移动适配断点 */
@media (max-width: 991px) {
    .m-studio-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .m-studio-sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.15);
        z-index: 1060;
    }

    .m-studio-sidebar.show {
        transform: translateX(0);
    }

    .m-studio-keypad-sidebar {
        display: none !important;
        /* 移动端用底部滑出式虚拟键盘 */
    }

    .m-studio-main {
        padding: 12px;
        height: auto;
        overflow: visible;
    }

    .score-sheet-table {
        display: none !important;
        /* 隐藏传统的表格，改用卡片看板 */
    }
}

/* 移动端单组卡片看板行 */
.m-end-card-row {
    background: #ffffff;
    border: 1.5px solid #e5e5e0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.m-end-card-row:active {
    background: #f5f5f4;
    transform: scale(0.98);
}

.m-end-card-label {
    font-weight: 900;
    font-size: 15px;
    color: #1c1c1e;
}

.m-end-card-arrows {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: center;
    padding: 0 8px;
}

.m-end-card-totals {
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: #8e8e93;
}

.m-end-card-end-total {
    font-size: 16px;
    color: var(--brand-blue);
    font-weight: 900;
}

/* 移动端底部录入弹窗抽屉 */
.m-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2040;
    padding: 16px 16px 270px 16px !important;
    /* 预留 270px 底部间距防止被虚拟键盘遮挡 */
    border-top: 1.5px solid rgba(0, 0, 0, 0.08);
}

.m-bottom-sheet.show {
    transform: translateY(0);
}

.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2030;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sheet-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 抽屉大对焦框 */
.m-focus-arrow-cell {
    width: 46px !important;
    height: 46px !important;
    font-size: 22px !important;
    font-weight: 900;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.15s;
    cursor: pointer;
}

.m-focus-arrow-cell.active {
    border-color: var(--brand-blue) !important;
    background: #e8f2ff !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2) !important;
    animation: active-arrow-blink 1.0s infinite alternate !important;
}

@keyframes active-arrow-blink {
    from {
        border-color: var(--brand-blue) !important;
        box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.35) !important;
        background: #e8f2ff !important;
    }

    to {
        border-color: #0071e3 !important;
        box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.15) !important;
        background: #ffffff !important;
    }
}

/* 移动端固定底部键盘面板 */
.m-bubble-keypad.mobile-bottom-keypad {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    padding: 14px !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15) !important;
    background: #f1f3f5 !important;
    border-top: 1.5px solid #ced4da !important;
    z-index: 2050 !important;
    display: grid !important;
}

.m-bubble-keypad.mobile-bottom-keypad .m-key-btn {
    width: 100% !important;
    height: 56px !important;
    /* 增大触控按键高度 */
    font-size: 18px !important;
    /* 增大按键字体 */
    font-weight: 800 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mobile-quick-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    border: 1.5px solid #e5e5e0;
    padding: 10px 14px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* 赛程编排画布 5.0 (Schedule Redesign Styles) */
.schedule-item-card {
    transition: all 0.15s ease-in-out;
}

.schedule-item-card:hover {
    border-color: #206bc4 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}

.drag-handle {
    cursor: grab;
    padding: 4px;
}

.drag-handle:active {
    cursor: grabbing;
}

.extra-small {
    font-size: 11px;
}


/* ══════════════════════════════════════════════════════════
   全站后台舒适大字号与控件等比匹配规范（2026-11-23）
   - 仅作用于后台工作台，不覆盖对外黑白公报页 (.pr-page)
   ══════════════════════════════════════════════════════════ */
body:not(:has(.pr-page)) {
    font-size: 15px;
    line-height: 1.55;
}

body:not(:has(.pr-page)) .page-title {
    font-size: 1.42rem;
    line-height: 1.35;
}

body:not(:has(.pr-page)) .card-title {
    font-size: 1.08rem;
}

body:not(:has(.pr-page)) .form-label {
    font-size: 13.5px;
    margin-bottom: 5px;
}

body:not(:has(.pr-page)) .form-control,
body:not(:has(.pr-page)) .form-select {
    font-size: 15px;
    min-height: 40px;
    padding: 7px 12px;
    line-height: 1.45;
}

body:not(:has(.pr-page)) .form-control-sm,
body:not(:has(.pr-page)) .form-select-sm {
    font-size: 14px;
    min-height: 34px;
    padding: 5px 10px;
    line-height: 1.4;
}

body:not(:has(.pr-page)) .btn {
    font-size: 14.5px;
    padding: 7px 14px;
    line-height: 1.4;
}

body:not(:has(.pr-page)) .btn-sm {
    font-size: 13.5px;
    padding: 5px 11px;
    line-height: 1.35;
}

body:not(:has(.pr-page)) .btn-sm.btn-icon {
    min-width: 34px;
    min-height: 34px;
    padding: 0;
}

body:not(:has(.pr-page)) .table th {
    font-size: 14px;
    padding: 11px 12px;
}

body:not(:has(.pr-page)) .table td {
    font-size: 15px;
    padding: 11px 12px;
}

body:not(:has(.pr-page)) .navbar-vertical .nav-link {
    font-size: 14.5px;
    padding: 9px 14px;
}

body:not(:has(.pr-page)) .nav-tabs .nav-link {
    font-size: 14.5px;
    padding: 10px 16px;
}

body:not(:has(.pr-page)) .badge {
    font-size: 12.5px;
    padding: 4px 8px;
}

body:not(:has(.pr-page)) .small,
body:not(:has(.pr-page)) small,
body:not(:has(.pr-page)) .form-hint {
    font-size: 13px;
}

body:not(:has(.pr-page)) .dropdown-menu,
body:not(:has(.pr-page)) .dropdown-item {
    font-size: 14px;
}
