/* ============================================
   夜店人VIP 会员中心 - 全局样式
   主色: #e60012 | 深色: #1a1a1a | 背景: #f4f4f4
   ============================================ */
:root {
    --primary: #e60012;
    --primary-hover: #c4000f;
    --dark: #1a1a1a;
    --dark-2: #2d2d2d;
    --bg: #f4f4f4;
    --card-bg: #ffffff;
    --border: #eeeeee;
    --text-main: #333333;
    --text-sub: #999999;
    --sidebar-w: 220px;
    --wrap-w: 1200px;
    --radius: 4px;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);

    /* 投稿表单兼容别名（与 style.css 变量命名对齐） */
    --cms-primary: var(--primary);
    --cms-primary-hover: var(--primary-hover);
    --cms-text-main: var(--text-main);
    --cms-text-muted: #666666;
    --cms-text-light: var(--text-sub);
    --cms-border-color: var(--border);
    --cms-border-radius: var(--radius);
    --cms-card-bg: var(--card-bg);
    --cms-spacing-sm: 8px;
    --cms-spacing-md: 16px;
    --cms-spacing-lg: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
    font-size: 14px;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--primary);
}

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: 14px;
}

/* ---- 分页样式（保留帝国原生分页兼容） ---- */
.epages {
    margin: 8px 0;
    font-size: 13px;
}

.epages * {
    vertical-align: middle;
}

.epages a {
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid #ddd;
    margin: 0 2px;
    color: var(--text-main);
    border-radius: var(--radius);
}

.epages a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.epages input {
    height: 26px;
    border: 1px solid #ddd;
    padding: 0 6px;
    border-radius: var(--radius);
}

/* ---- 表格兼容（部分内页仍用table） ---- */
.tableborder {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100% !important;
    table-layout: fixed;
}

.tableborder td {
    word-break: break-all;
}

.header {
    background: var(--primary);
    color: #fff;
    font-weight: bold;
}

.header a {
    color: #fff;
}

table {
    border-collapse: collapse;
}

/* ============================================
   顶部 Header Bar
   ============================================ */
.yd-topbar {
    background: var(--dark);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 13px;
    color: #aaa;
}

.yd-topbar a {
    color: #ccc;
    margin: 0 6px;
}

.yd-topbar a:hover {
    color: var(--primary);
}

.yd-topbar .tb-left,
.yd-topbar .tb-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.yd-topbar .tb-sep {
    color: #555;
}

.yd-topbar .tb-username {
    color: var(--primary);
    font-weight: bold;
}

.yd-topbar .tb-exit {
    background: var(--primary);
    color: #fff !important;
    padding: 2px 10px;
    border-radius: var(--radius);
    margin-left: 8px;
}

.yd-topbar .tb-exit:hover {
    background: var(--primary-hover);
}

/* ============================================
   主 Logo/Header 区
   ============================================ */
.yd-header {
    background: var(--card-bg);
    border-bottom: 3px solid var(--primary);
}

.yd-header-inner {
    max-width: var(--wrap-w);
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.yd-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.yd-logo-icon {
    background: var(--primary);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    letter-spacing: -1px;
}

.yd-logo-text {
    line-height: 1.2;
}

.yd-logo-text strong {
    font-size: 20px;
    color: var(--dark);
    display: block;
}

.yd-logo-text span {
    font-size: 11px;
    color: var(--text-sub);
}

.yd-header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.yd-header-nav a {
    padding: 6px 12px;
    color: var(--text-sub);
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.yd-header-nav a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.yd-header-nav a.active {
    color: var(--primary);
    border-color: var(--primary);
}

/* ============================================
   面包屑导航
   ============================================ */
.yd-breadcrumb {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.yd-breadcrumb-inner {
    max-width: var(--wrap-w);
    margin: 0 auto;
    padding: 8px 20px;
    font-size: 13px;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 6px;
}

.yd-breadcrumb-inner a {
    color: var(--text-sub);
}

.yd-breadcrumb-inner a:hover {
    color: var(--primary);
}

.yd-breadcrumb-inner .bc-sep {
    color: #ccc;
}

/* ============================================
   主体 Grid 布局
   ============================================ */
.yd-main {
    max-width: var(--wrap-w);
    margin: 20px auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: 16px;
    align-items: start;
}

/* ============================================
   侧边栏
   ============================================ */
.yd-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* 侧边栏 - 用户信息头像区 */
.yd-sidebar-user {
    background: var(--dark);
    padding: 20px 16px;
    text-align: center;
}

.yd-sidebar-user img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    display: block;
    margin: 0 auto 10px;
}

.yd-sidebar-user .su-name {
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 4px;
}

.yd-sidebar-user .su-name a {
    color: #fff;
}

.yd-sidebar-user .su-name a:hover {
    color: var(--primary);
}

.yd-sidebar-user .su-level {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 20px;
}

/* 侧边栏 - 菜单组 */
.yd-sidebar-section {
    border-top: 1px solid var(--border);
}

.yd-sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-sub);
    cursor: pointer;
    user-select: none;
    background: #fafafa;
    letter-spacing: .5px;
    transition: background .15s, color .15s;
}

.yd-sidebar-section-title .sec-icon {
    font-size: 14px;
}

.yd-sidebar-section-title .sec-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform .25s ease;
    color: #ccc;
    flex-shrink: 0;
}

/* 展开状态：箭头朝下 */
.yd-sidebar-section-title.open .sec-arrow {
    transform: rotate(180deg);
}

.yd-sidebar-section-title.active {
    color: var(--primary);
    background: #fff5f5;
}

.yd-sidebar-section-title.active .sec-arrow {
    color: var(--primary);
}

/* 收缩动画 */
.yd-sidebar-section-body {
    padding: 4px 0;
    overflow: hidden;
    max-height: 600px;
    /* 默认展开足够高 */
    transition: max-height .3s ease, padding .3s ease, opacity .2s ease;
    opacity: 1;
}

.yd-sidebar-section-body.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
}

.yd-sidebar-section-body a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px 8px 28px;
    font-size: 13px;
    color: var(--text-main);
    border-left: 3px solid transparent;
    transition: all .15s;
}

.yd-sidebar-section-body a:hover {
    background: #fff5f5;
    color: var(--primary);
    border-left-color: var(--primary);
}

.yd-sidebar-section-body a.current {
    color: var(--primary);
    border-left-color: var(--primary);
    background: #fff5f5;
    font-weight: bold;
}

/* 侧边栏 - 退出按钮 */
.yd-sidebar-exit {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.yd-sidebar-exit a {
    display: block;
    text-align: center;
    padding: 8px;
    background: var(--dark);
    color: #fff;
    border-radius: var(--radius);
    font-size: 13px;
    transition: background .2s;
}

.yd-sidebar-exit a:hover {
    background: var(--primary);
    color: #fff;
}

/* 游客侧边栏特殊样式 */
.yd-sidebar-guest {
    padding: 20px 16px;
}

.yd-sidebar-guest .guest-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--text-sub);
    text-align: center;
}

.yd-sidebar-guest .btn-login,
.yd-sidebar-guest .btn-register {
    display: block;
    text-align: center;
    padding: 9px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
}

.yd-sidebar-guest .btn-login {
    background: var(--primary);
    color: #fff;
}

.yd-sidebar-guest .btn-login:hover {
    background: var(--primary-hover);
    color: #fff;
}

.yd-sidebar-guest .btn-register {
    background: var(--dark);
    color: #fff;
}

.yd-sidebar-guest .btn-register:hover {
    background: var(--dark-2);
    color: #fff;
}

/* ============================================
   内容区
   ============================================ */
.yd-content {
    min-width: 0;
    /* 防止Grid溢出 */
}

/* 内容区 - 通用卡片 */
.yd-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.yd-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: bold;
    color: var(--text-main);
}

.yd-card-header::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.yd-card-body {
    padding: 16px;
}

/* ============================================
   表单样式（登录/注册/修改资料等）
   ============================================ */
.yd-form-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
}

.yd-form-label {
    width: 90px;
    flex-shrink: 0;
    padding-top: 8px;
    font-size: 14px;
    color: var(--text-sub);
    text-align: right;
}

.yd-form-label.required::after {
    content: ' *';
    color: var(--primary);
}

.yd-form-control {
    flex: 1;
}

.yd-form-control input[type=text],
.yd-form-control input[type=password],
.yd-form-control input[type=email],
.yd-form-control select,
.yd-form-control textarea {
    width: 100%;
    max-width: 380px;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}

.yd-form-control input:focus,
.yd-form-control select:focus,
.yd-form-control textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(230, 0, 18, .1);
}

.yd-form-tip {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
}

/* 解决模型表单溢出的核心修复 */
/* 极致美化投稿表单控件 */
.modern-submission-form {
    background: #fff;
    padding: 20px;
}

.modern-submission-form .form-group {
    margin-bottom: 20px;
}

/* 并排布局 */
.modern-submission-form .grid-1-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modern-submission-form .grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modern-submission-form .grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .modern-submission-form .grid-1-col {
        grid-template-columns: repeat(1, 1fr);
        gap: 5px;
    }

    .modern-submission-form .grid-2-col {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    /* 强行保持三列并排，适应窄屏 */
    .modern-submission-form .grid-3-col {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .modern-submission-form .grid-3-col label {
        font-size: 11px;
        padding-left: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .modern-submission-form .grid-3-col select,
    .modern-submission-form .grid-3-col input {
        font-size: 12px;
        padding: 4px 6px !important;
    }
}

.modern-submission-form label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 14px;
    border-left: 3px solid #e60012;
    padding-left: 8px;
}

/* 统一输入控件样式，防止溢出 */
.modern-submission-form select,
.modern-submission-form input[type="text"],
.modern-submission-form input[type="password"],
.modern-submission-form input[type="file"],
.modern-submission-form .input-wrapper input {
    width: 100% !important;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: all 0.3s;
    outline: none;
    box-sizing: border-box !important;
}

/* 独立设置文本域的高度，防止被全局 42px 覆盖 */
.modern-submission-form textarea {
    width: 100% !important;
    min-height: 120px;
    height: auto;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: all 0.3s;
    outline: none;
    box-sizing: border-box !important;
}

.modern-submission-form select {
    -webkit-appearance: none;
    cursor: pointer;
}

.modern-submission-form select:focus,
.modern-submission-form input:focus {
    border-color: #e60012;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(230, 0, 18, 0.1);
}

/* 编辑器容器强制高度 */
.editor-wrapper {
    height: 250px !important;
    /* 写死高度 */
    min-height: 250px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* 强制内部所有组件（包括 textarea 和 iframe）填满父容器 */
.editor-wrapper textarea,
.editor-wrapper iframe,
.editor-wrapper table,
.editor-wrapper .cke_contents,
.editor-wrapper .cke_editor {
    height: 100% !important;
    min-height: 100% !important;
    width: 100% !important;
}

/* 针对纯文本模式的 textarea 深度优化：强制换行并隐藏横向条 */
.editor-wrapper textarea {
    padding: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: hidden;
    resize: none;
}


/* 提示图标样式 - 适配 PC 悬停 & 移动端点击 */
.yd-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e90909ff;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    margin-left: 5px;
    cursor: help;
    position: relative;
    vertical-align: middle;
    font-style: normal;
    font-weight: normal;
}

.yd-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    width: 220px;
    white-space: normal;
    line-height: 1.5;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.yd-tip::before {
    content: "";
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.yd-tip:hover::after,
.yd-tip:active::after,
.yd-tip.active::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.yd-tip:hover::before,
.yd-tip:active::before,
.yd-tip.active::before {
    opacity: 1;
    visibility: visible;
}


/* 按钮 */
.yd-btn {
    display: inline-block;
    padding: 8px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background .2s;
    text-align: center;
}

.yd-btn-primary {
    background: var(--primary);
    color: #fff;
}

.yd-btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.yd-btn-dark {
    background: var(--dark);
    color: #fff;
}

.yd-btn-dark:hover {
    background: var(--dark-2);
    color: #fff;
}

.yd-btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.yd-btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================================
   消息/提示框
   ============================================ */
.yd-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 14px;
    border: 1px solid transparent;
}

.yd-alert-success {
    background: #f0fff4;
    border-color: #b2f5c8;
    color: #22863a;
}

.yd-alert-error {
    background: #fff5f5;
    border-color: #fdb8c0;
    color: #c0392b;
}

.yd-alert-info {
    background: #f0f8ff;
    border-color: #bee3f8;
    color: #2b6cb0;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
    .yd-main {
        grid-template-columns: 200px 1fr;
    }

    :root {
        --wrap-w: 100%;
    }
}

@media (max-width: 768px) {
    .yd-main {
        grid-template-columns: 1fr;
        padding: 0 12px 30px;
        margin-top: 12px;
        gap: 12px;
    }

    .yd-sidebar {
        order: 2;
    }

    .yd-content {
        order: 1;
    }

    .yd-header-inner {
        height: 56px;
    }

    .yd-logo-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .yd-logo-text strong {
        font-size: 16px;
    }

    .yd-topbar {
        font-size: 12px;
    }

    .yd-topbar .tb-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .yd-header-nav {
        display: none;
    }
}

/* ==============================================================
   前台投稿表单样式 (Modern Submission Form)
   ============================================================== */
.modern-submission-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.modern-submission-form .form-group {
    display: grid !important;
    gap: 15px 25px !important;
    margin-bottom: 25px !important;
}

.modern-submission-form .grid-3-col {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.modern-submission-form .sub-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.sub-group label {
    font-size: 14px;
    font-weight: bold;
    color: var(--cms-text-main);
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--cms-border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
    background: #fafafa;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    border-color: var(--cms-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
}

/* 表单填写状态反馈 - 强化优先级 */
.modern-submission-form input.filled,
.modern-submission-form select.filled,
.modern-submission-form textarea.filled,
.modern-submission-form .filled {
    border-color: #25b513 !important;
    background-color: #f8fff7 !important;
    box-shadow: 0 0 0 3px rgba(37, 181, 19, 0.1) !important;
}

/* 复选框组容器：强制换行 */
.modern-submission-form .fx-checkbox-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px 18px !important;
    padding: 10px 0 !important;
    width: 100% !important;
    align-items: center !important;
}

.modern-submission-form .fx-checkbox-group label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    border: none !important;
    border-left: none !important;
    background: transparent !important;
    font-weight: normal !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.modern-submission-form .fx-checkbox-group label::before,
.modern-submission-form .fx-checkbox-group label::after {
    display: none !important;
    content: none !important;
}

.modern-submission-form .fx-checkbox-group input[type="checkbox"] {
    position: static !important;
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

/* ==============================================================
   详情页增强样式 (内容页)
   ============================================================== */
.cms-ai-box {
    background: #ffffff;
    border-left: 5px solid var(--cms-primary);
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.cms-ai-box h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px !important;
    margin-top: 0 !important;
    color: var(--cms-text-main) !important;
    margin-bottom: 20px !important;
    border: none !important;
    padding: 0 !important;
}

.cms-ai-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.cms-ai-list li {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 12px;
    color: #444;
    padding-left: 85px;
    position: relative;
    min-height: 1.8em;
}

.cms-ai-list li strong:first-child {
    color: #111;
    position: absolute;
    left: 0;
    top: 0;
    width: 85px;
}

.cms-ai-list li:last-child {
    margin-bottom: 0;
}



.cms-detail-meta-box.column {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 10px;
}

.cms-ai-verify {
    font-size: 13px;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.cms-safe-tip {
    background: #fff8eb;
    border: 1px solid #ffd09b;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.cms-safe-tip h3 {
    margin-top: 0 !important;
    color: #c75e00 !important;
    border: none !important;
    font-size: 16px !important;
    padding: 0 !important;
}

.cms-safe-tip p {
    color: #8f5012 !important;
    font-size: 14px !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* ==============================================================
   工具类与微调 (Utilities)
   ============================================================== */
.modern-submission-form .full-width {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

.modern-submission-form .relative,
.modern-submission-form .fw-relative {
    position: relative !important;
}

.modern-submission-form .h-60 {
    height: 80px !important;
    padding-bottom: 25px !important;
}

.modern-submission-form .h-180 {
    height: 200px !important;
    padding: 12px !important;
}

.txt-red {
    color: var(--cms-primary) !important;
    font-weight: bold;
}

.txt-caution {
    color: #f44336 !important;
    font-size: 12px !important;
    font-weight: normal !important;
    margin-left: 10px !important;
}

.char-counter {
    position: absolute;
    right: 10px;
    bottom: 5px;
    font-size: 12px;
    color: #999;
}

/* 图片上传组件细节 */
.upload-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.cms-btn-upload {
    background: #f8f9fa;
    border: 1px solid var(--cms-border-color);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--cms-text-main);
    font-size: 14px;
    transition: all 0.2s;
}

.cms-btn-upload:hover {
    background: #eee;
    border-color: #ccc;
}

.upload-info {
    font-size: 12px;
    color: var(--cms-text-muted);
}

.preview-grid {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* 底部操作区美化与全宽组件修正 */
.modern-submission-form .preview-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
}

.modern-submission-form .form-btn-group {
    display: flex !important;
    gap: 15px !important;
    margin: 30px 0 10px !important;
    border-top: 1px solid #eee !important;
    padding-top: 25px !important;
    width: 100% !important;
}

.modern-submission-form .cms-btn-submit,
.modern-submission-form .cms-btn-reset {
    flex: 1 !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    font-size: 16px !important;
    border: none !important;
    transition: all 0.2s !important;
    text-align: center !important;
    display: inline-block !important;
}

.modern-submission-form .cms-btn-submit {
    background: #e60012 !important;
    color: #fff !important;
}

.modern-submission-form .cms-btn-reset {
    background: #666 !important;
    color: #fff !important;
}

/* ==============================================================
   投稿表单组件样式（提取自各模板内联style，统一在此管理）
   ============================================================== */

/* 全列宽（grid-column: 1/-1）*/
.fw-full-col {
    grid-column: 1 / -1;
}

/* 核心优势 textarea（短文本60px高）*/
.fw-short-desc {
    height: 60px !important;
    min-height: 60px !important;
    padding-bottom: 25px;
}

/* 正文 textarea（180px高）*/
.fw-newstext {
    height: 180px;
    min-height: 180px;
    padding: 12px;
    resize: vertical;
}

/* 字数计数器 */
.fw-char-counter {
    position: absolute;
    right: 10px;
    bottom: 5px;
    font-size: 12px;
    color: #999;
}

/* 图片上传行 */
.fw-upload-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

/* 隐藏的 file input */
.fw-file-input {
    display: none;
}

/* 选择图片按钮 */
.fw-upload-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

/* 已传数量提示 */
.fw-upload-hint {
    font-size: 12px;
    color: #999;
}

.fw-upload-hint strong {
    color: #d32f2f;
    font-weight: bold;
}

/* 图片预览容器 */
.fw-preview-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* 标签/复选框组容器 */
.fw-tag-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* 标签占位提示文字 */
.fw-placeholder-tip {
    color: #999;
    font-size: 13px;
}

/* 警告红色小字 */
.fw-warn-tip {
    color: #f44336;
    font-size: 12px;
    font-weight: normal;
    margin-left: 10px;
}

/* 复选框 label（覆盖帝国CMS默认 label 样式） */
.fw-checkbox-label {
    font-weight: normal !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 6px !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    color: #333 !important;
    width: auto !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 4px 0 !important;
}

.fw-checkbox-label::before,
.fw-checkbox-label::after {
    display: none !important;
    content: none !important;
}

/* 复选框 input（强制还原原生外观，覆盖帝国CSS污染） */
.fw-checkbox {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    min-width: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    position: static !important;
}

/* 响应式表单行增强 */
@media (max-width: 640px) {
    .yd-form-row {
        flex-direction: column;
        gap: 6px;
    }

    .yd-form-label {
        width: 100% !important;
        text-align: left !important;
        padding-top: 0;
        font-weight: bold;
    }

    .yd-form-control {
        width: 100%;
    }

    .yd-form-control input[type=text],
    .yd-form-control input[type=password],
    .yd-form-control input[type=email],
    .yd-form-control select,
    .yd-form-control textarea {
        max-width: 100% !important;
    }
}