/* RunOrder 公共组件样式 - Landrick 风格统一 */
:root { --ro-primary: #2f55d4; --ro-primary-dark: #2443ac; --ro-radius: 6px; --ro-radius-lg: 8px; }

body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }

/* 卡片容器 */
.ro-card { background: #fff; border-radius: var(--ro-radius-lg); box-shadow: 0 2px 14px rgba(47,85,212,.08); }

/* 圆角输入框 */
.ro-input {
    width: 100%; height: 48px; border: 1px solid #e5e9f2; border-radius: var(--ro-radius);
    padding: 0 14px; font-size: 15px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.ro-input:focus { border-color: var(--ro-primary); box-shadow: 0 0 0 3px rgba(47,85,212,.12); }
.ro-input-group { position: relative; }
.ro-input-group .ro-input { padding-left: 44px; }
.ro-input-group > i.mdi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #b0b8cc; font-size: 20px; }

/* 主按钮 */
.ro-btn-primary {
    height: 48px; border: none; border-radius: var(--ro-radius);
    background: var(--ro-primary); color: #fff; font-size: 15px; font-weight: 600;
    transition: background .15s, box-shadow .15s;
}
.ro-btn-primary:hover { background: var(--ro-primary-dark); box-shadow: 0 4px 14px rgba(47,85,212,.3); }
.ro-btn-primary:disabled { opacity: .55; }
.ro-btn-outline {
    height: 46px; border: 1.5px solid #d6dbef; border-radius: var(--ro-radius); background: #fff;
    color: var(--ro-primary); font-size: 15px; font-weight: 600; transition: all .15s;
}
.ro-btn-outline:hover { background: #f4f6ff; border-color: var(--ro-primary); }

/* 顶部标题栏（内页通用） */
.ro-page-bar {
    background: linear-gradient(135deg, var(--ro-primary), #4d6fe8);
    padding: 38px 20px 30px; text-align: center; color: #fff;
}
.ro-page-bar h4 { font-weight: 700; margin: 0; }
.ro-page-bar .sub { font-size: 13px; opacity: .88; margin-top: 6px; }

/* 返回条 */
.ro-topbar {
    height: 54px; background: #fff; display: flex; align-items: center; padding: 0 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,.04); position: sticky; top: 0; z-index: 40;
}
.ro-topbar .back { font-size: 22px; color: var(--ro-primary); cursor: pointer; }
.ro-topbar .title { flex: 1; text-align: center; font-weight: 700; font-size: 16px; color: #333; margin-right: 22px; }

/* 选项卡切换 */
.ro-tabs { display: flex; background: #eef1f8; border-radius: var(--ro-radius); padding: 4px; }
.ro-tabs > div { flex: 1; text-align: center; padding: 9px 0; border-radius: 4px; font-size: 14px; color: #666; cursor: pointer; font-weight: 600; transition: all .15s; }
.ro-tabs > div.active { background: var(--ro-primary); color: #fff; box-shadow: 0 3px 8px rgba(47,85,212,.25); }

/* 日期选择网格 */
.ro-days-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ro-day-btn {
    height: 46px; border: 1.5px solid #e5e9f2; border-radius: var(--ro-radius); display: flex;
    align-items: center; justify-content: center; font-size: 14px; color: #555;
    cursor: pointer; transition: all .15s; background: #fff; user-select: none;
}
.ro-day-btn.on { border-color: var(--ro-primary); background: var(--ro-primary); color: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(47,85,212,.25); }

/* 区块标题 */
.ro-sec-title { font-size: 15px; font-weight: 700; color: #333; display: flex; align-items: center; }
.ro-sec-title i { color: var(--ro-primary); font-size: 20px; margin-right: 8px; }
.ro-sec-sub { font-size: 12px; color: #9aa3b8; margin: 4px 0 14px 28px; }

/* 信息行 */
.ro-info-line { font-size: 13.5px; color: #555; padding: 8px 0; border-bottom: 1px dashed #eef0f5; display: flex; justify-content: space-between; }
.ro-info-line:last-child { border-bottom: none; }
.ro-info-line b { color: #333; }

/* 标签徽章 */
.ro-mask-badge { background: #eaf0ff; color: var(--ro-primary); border-radius: var(--ro-radius); padding: 12px; text-align: center; font-size: 17px; font-weight: 700; letter-spacing: 2px; }
.ro-type-tag { display: inline-block; background: rgba(255,255,255,.25); border-radius: 16px; padding: 3px 12px; font-size: 12px; margin-top: 10px; }

/* 弹窗 */
.ro-modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 999; display: none; align-items: center; justify-content: center; padding: 20px; }
.ro-modal-mask.show { display: flex; }
.ro-modal-box { background: #fff; border-radius: var(--ro-radius-lg); max-width: 460px; width: 100%; max-height: 86vh; overflow-y: auto; }
.ro-modal-head { background: var(--ro-primary); color: #fff; padding: 14px 18px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; align-items: center; border-radius: var(--ro-radius-lg) var(--ro-radius-lg) 0 0; }
.ro-modal-head .x { cursor: pointer; font-size: 22px; opacity: .85; line-height: 1; }
.ro-modal-body { padding: 20px; }
.ro-modal-foot { display: flex; gap: 10px; padding: 0 20px 20px; }

/* 提示条 */
.ro-hint-bar { background: #fff8e6; border: 1px solid #ffe3a8; color: #b5790a; border-radius: var(--ro-radius); font-size: 13px; padding: 10px 14px; }

/* 文本链接按钮 */
.ro-link-btn { background: none; border: none; color: var(--ro-primary); font-size: 13px; text-decoration: underline; }

/* 成功页 */
.ro-ok-icon { width: 76px; height: 76px; border-radius: 50%; background: #e8f6ef; display: inline-flex; align-items: center; justify-content: center; }
.ro-ok-icon i { font-size: 42px; color: #2eca8b; }
.ro-acc-box { background: linear-gradient(135deg, var(--ro-primary), #4d6fe8); color: #fff; border-radius: var(--ro-radius); padding: 16px; }

/* 表单标签 */
.ro-label { font-size: 13px; color: #555; font-weight: 600; }
.ro-label .req { color: #f46a6a; }
/* ===== 全局过渡动画 ===== */
*, *::before, *::after { transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease, transform .25s cubic-bezier(.4,0,.2,1), opacity .25s ease; }

/* 卡片 hover 抬升 */
.ro-card, .ro-panel, .ro-stat-card { transition: box-shadow .3s ease, transform .3s ease; }
.ro-card:hover, .ro-panel:hover { box-shadow: 0 8px 26px rgba(47,85,212,.16); transform: translateY(-2px); }

/* 按钮 */
.ro-btn-primary, .ro-btn-outline, .ro-day-btn, .ro-quick-item, .ro-buy-row { transition: all .2s cubic-bezier(.4,0,.2,1); }
.ro-btn-primary:active, .ro-btn-outline:active { transform: scale(.96); }
.ro-day-btn:active { transform: scale(.92); }
.ro-input { transition: border-color .2s ease, box-shadow .2s ease; }

/* ===== Tab 平移切换（滑块动画） ===== */
.ro-tabs { position: relative; }
.ro-tabs > div { transition: color .2s ease; position: relative; z-index: 2; }
.ro-tabs > div.active { color: #fff; }
.ro-tabs::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px;
    width: 0; height: calc(100% - 8px);
    background: var(--ro-primary);
    border-radius: 4px;
    z-index: 1;
    transition: transform .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 3px 8px rgba(47,85,212,.3);
}
/* 平移到指定位置（由 JS 设置 --tab-idx / --tab-count） */
.ro-tabs[data-count='2']::before { width: calc(50% - 4px); transform: translateX(calc(var(--tab-idx, 0) * 100%)); }
.ro-tabs[data-count='3']::before { width: calc(33.333% - 3px); transform: translateX(calc(var(--tab-idx, 0) * 100% + var(--tab-idx, 0) * 2px)); }

/* ===== 卡片入场动画 ===== */
@keyframes roFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes roFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes roSlideUp { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.ro-card, .ro-panel { animation: roFadeUp .45s cubic-bezier(.4,0,.2,1) both; }
.ro-stat-card { animation: roFadeUp .4s cubic-bezier(.4,0,.2,1) both; }
.ro-stat-card:nth-child(2) { animation-delay: .07s; }
.ro-stat-card:nth-child(3) { animation-delay: .14s; }
.ro-stat-card:nth-child(4) { animation-delay: .21s; }
.ro-quick-item, .ro-buy-row { animation: roSlideUp .35s cubic-bezier(.4,0,.2,1) both; }
.ro-table tbody tr { animation: roFadeIn .3s ease both; }

/* ===== 弹窗动画（丝滑，仿 Bootstrap modal） ===== */
@keyframes roBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes roBackdropOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes roDialogIn { 0% { opacity: 0; transform: translate(0,-12px) scale(.96); } 100% { opacity: 1; transform: translate(0,0) scale(1); } }
@keyframes roDialogOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.96); } }

.ro-modal-mask { animation: roBackdropIn .25s ease both; }
.ro-modal-mask.closing { animation: roBackdropOut .2s ease both; }
.ro-modal-box { animation: roDialogIn .3s cubic-bezier(.4,0,.2,1) both; }
.ro-modal-mask.closing .ro-modal-box { animation: roDialogOut .2s ease both; }

/* Toast 动画 */
@keyframes roToastIn { from { opacity: 0; transform: translate(-50%,-10px) scale(.95); } to { opacity: 1; transform: translate(-50%,0) scale(1); } }
#ro_toast { animation: roToastIn .25s cubic-bezier(.4,0,.2,1) both; }

/* 页面切换 */
@keyframes roPageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ro-main, .container { animation: roPageIn .35s cubic-bezier(.4,0,.2,1) both; }

/* 表格行依次入场 */
.ro-table tbody tr:nth-child(1){animation-delay:.02s}
.ro-table tbody tr:nth-child(2){animation-delay:.04s}
.ro-table tbody tr:nth-child(3){animation-delay:.06s}
.ro-table tbody tr:nth-child(4){animation-delay:.08s}
.ro-table tbody tr:nth-child(5){animation-delay:.1s}
.ro-table tbody tr:nth-child(6){animation-delay:.12s}
.ro-table tbody tr:nth-child(7){animation-delay:.14s}
.ro-table tbody tr:nth-child(8){animation-delay:.16s}

/* 分页按钮动画 */
.pagination .page-item { transition: all .2s ease; }
.pagination .page-item:not(.active) .page-link:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(47,85,212,.2); }

/* 输入框聚焦动画 */
.ro-input:focus { transform: none; }
.ro-input { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.ro-input:focus { transform: translateY(-1px); }

/* 卡密输入框聚焦微抬 */
.ro-input-group { transition: transform .2s ease; }