/* ================= 账户管理页样式（account.html 专用） =================
   布局与后台管理系统（admin）保持一致：
   深色顶栏 + 左侧白底侧边栏 + 右侧灰底内容区卡片。
   表单沿用浮动标签输入框风格（复制自 register.css）。 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

/* ===== 顶栏（深色通栏，同后台 .admin-topbar）===== */
.ac-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 24px;
    background-color: #001529;
    color: #fff;
}

.ac-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.ac-topbar-brand:hover {
    color: #fff;
}

.ac-topbar-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.ac-topbar-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.ac-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ac-topbar-company {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-topbar-logout {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.ac-topbar-logout:hover {
    color: #fff;
}

/* ===== 主体：左菜单 + 右内容（同后台 .admin-body）===== */
.ac-body {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* ===== 左侧菜单（同后台 .admin-sidebar）===== */
.ac-sidebar {
    width: 220px;
    flex-shrink: 0;
    background-color: #fff;
    border-right: 1px solid #e8e8e8;
    padding: 12px 0;
}

.ac-menu-item {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    color: #333;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background-color 0.2s, color 0.2s;
}

.ac-menu-item:hover {
    background-color: #f0f6ff;
    color: #1677ff;
}

.ac-menu-item.active {
    background-color: #e6f0ff;
    color: #1677ff;
    border-left-color: #1677ff;
    font-weight: 600;
}

/* ===== 右侧内容区（同后台 .admin-content）===== */
.ac-content {
    flex: 1;
    padding: 24px;
    overflow: auto;
}

/* 面板切换 */
.ac-panel {
    display: none;
}

.ac-panel.active {
    display: block;
}

/* ===== 卡片（同后台 .admin-section）===== */
.ac-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ac-card-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a2233;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

/* ===== 表单：浮动标签输入框（复制自 register.css）===== */
.float-field {
    position: relative;
    margin-bottom: 22px;
}

.float-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #fff;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.float-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.float-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 4px;
    font-size: 15px;
    color: #9aa4b2;
    background: #fff;
    pointer-events: none;
    cursor: text;
    transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease;
}

.float-field:focus-within .float-label,
.float-input:not(:placeholder-shown) + .float-label {
    top: 0;
    font-size: 12px;
}

.float-field:focus-within .float-label {
    color: #1677ff;
}

.req-star {
    color: #ff4d4f;
    margin-left: 2px;
}

/* ===== 公司介绍：大文本框（textarea）变体 =====
   复用 float-input 的轮廓/聚焦样式，但改为多行高度。
   标签默认贴框内顶部（非垂直居中），上浮后横骑上边框线。 */
.float-field-area .float-textarea {
    height: auto;
    min-height: 132px;
    padding: 16px 14px 28px;
    line-height: 1.6;
    resize: vertical;
}

.float-label-area {
    top: 14px;
    transform: none;
}

.float-field-area:focus-within .float-label-area,
.float-textarea:not(:placeholder-shown) ~ .float-label-area {
    top: 0;
    font-size: 12px;
}

.float-field-area:focus-within .float-label-area {
    color: #1677ff;
}

/* 字数统计：固定框内右下角 */
.float-area-count {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: 12px;
    color: #b3bcc8;
    pointer-events: none;
}

/* 只读态：textarea 标签底色与只读灰底一致 */
.ac-field-readonly .float-textarea,
.ac-field-editable .float-textarea[readonly] {
    background: #f0f2f7;
    color: #666;
    cursor: not-allowed;
}
.ac-field-readonly .float-label-area,
.ac-field-editable .float-textarea[readonly] ~ .float-label-area {
    background: #f0f2f7;
}
.ac-field-editable.editing .float-textarea,
.ac-field-editable.editing .float-label-area {
    background: #fff;
    color: #333;
}

/* 只读字段：灰底、不可编辑 */
.ac-field-readonly .float-input,
.ac-field-editable .float-input[readonly] {
    background: #f0f2f7;
    color: #666;
    cursor: not-allowed;
}

.ac-field-readonly .float-input:focus,
.ac-field-editable .float-input[readonly]:focus {
    border-color: #cfd8e3;
    box-shadow: none;
}

.ac-field-readonly .float-label,
.ac-field-editable .float-input[readonly] + .float-label {
    background: #f0f2f7;
}

.ac-field-readonly .float-input:not(:placeholder-shown) + .float-label,
.ac-field-editable .float-input[readonly]:not(:placeholder-shown) + .float-label {
    top: 0;
    font-size: 12px;
}

/* 可编辑字段处于只读态时，称谓 radio 禁用样式（降低对比） */
.gender-field.ac-field-editable .gender-option input[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.gender-field.ac-field-editable .gender-option input[disabled]::after {
    opacity: 0.5;
}

/* 编辑态：恢复白底可编辑 */
.ac-field-editable.editing .float-input {
    background: #fff;
    color: #333;
    cursor: text;
}

.ac-field-editable.editing .float-input[readonly] {
    /* 进入编辑态时由 JS 移除 readonly 属性，此处兜底 */
    background: #fff;
}

.ac-field-editable.editing .float-label {
    background: #fff;
}

.gender-field.ac-field-editable.editing .gender-option input {
    opacity: 1;
    cursor: pointer;
}

/* 称谓单选组 */
.gender-field {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 50px;
    margin-bottom: 22px;
}

.gender-label {
    font-size: 15px;
    color: #9aa4b2;
    flex-shrink: 0;
}

.gender-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.gender-option input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #cfd8e3;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gender-option input:checked {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.gender-option input:checked::after {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    margin: 2.7px auto;
    border-radius: 50%;
    background: #1677ff;
}

.gender-text {
    font-size: 15px;
    color: #333;
}

/* 表单两列网格（基本信息）/ 单列（密码、产品） */
.ac-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.ac-form-grid-onecol {
    grid-template-columns: 1fr;
}

/* 普通字段（带顶部 label，用于 textarea / 文件） */
.ac-field {
    margin-bottom: 22px;
}

.ac-field-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.ac-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #fff;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    outline: none;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ac-textarea:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

/* 文件选择 */
.ac-file-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ac-file-input {
    display: none;
}

.ac-file-pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    font-size: 14px;
    color: #1677ff;
    background: #fff;
    border: 1px solid #1677ff;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.ac-file-pick:hover {
    background: #1677ff;
    color: #fff;
}

.ac-file-name {
    font-size: 13px;
    color: #9aa4b2;
    word-break: break-all;
}

/* 文件选择行内的"添加"按钮：推到行末，右边与产品简介输入框右边对齐 */
.ac-submit-inline {
    width: auto;
    min-width: 100px;
    letter-spacing: 2px;
    text-indent: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

/* 行内"取消编辑"按钮：紧跟在添加按钮左侧 */
.ac-cancel-inline {
    height: 44px;
    width: auto;
    min-width: 96px;
    letter-spacing: 2px;
    text-indent: 2px;
    flex-shrink: 0;
}

.ac-preview-row {
    margin-bottom: 22px;
    position: relative;
}

.ac-preview-thumb {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e9f0;
    background: #f5f7fa;
    cursor: zoom-in;
}

/* 悬停缩略图时显示原图：固定 640×360 显示框，底边与缩略图底边对齐 */
.ac-preview-large {
    position: absolute;
    left: 152px;
    bottom: 0;
    width: 640px;
    height: 360px;
    max-width: calc(100vw - 100px);
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
    z-index: 60;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.ac-preview-large img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 表单提示信息 */
.ac-form-msg {
    min-height: 20px;
    font-size: 13px;
    color: #ff4d4f;
    margin-bottom: 10px;
}

.ac-form-msg.ok {
    color: #22c55e;
}

/* 提交按钮 */
.ac-submit {
    height: 44px;
    width: 160px;
    border: none;
    border-radius: 6px;
    background: #1677ff;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 4px;
    text-indent: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.ac-submit:hover {
    background: #3c8dff;
}

.ac-submit:active {
    background: #0e5fd8;
}

.ac-submit:disabled {
    background: #9ec4ff;
    cursor: not-allowed;
}

/* 操作按钮区 */
.ac-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ac-edit-btn {
    height: 44px;
    width: 100px;
    border: none;
    border-radius: 6px;
    background: #1677ff;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 4px;
    text-indent: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.ac-edit-btn:hover {
    background: #3c8dff;
}

.ac-edit-btn:active {
    background: #0e5fd8;
}

.ac-cancel-btn {
    height: 44px;
    width: 100px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 4px;
    text-indent: 4px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.ac-cancel-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
}

/* ===== 安全设置 ===== */
.ac-sec-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.ac-sec-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.ac-sec-label {
    font-size: 14px;
    color: #9aa4b2;
    flex: 0 0 90px;
}

.ac-sec-value {
    font-size: 15px;
    color: #1a2233;
    font-weight: 600;
    word-break: break-all;
}

.ac-sec-tip {
    font-size: 13px;
    color: #9aa4b2;
    line-height: 1.6;
}

/* ===== 产品管理：左右两栏布局 ===== */
.ac-product-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ac-product-layout .ac-card-half {
    flex: 1 1 50%;
    min-width: 0;
    margin-bottom: 0;
}

/* 右侧产品列表卡片：顶边不动，底边距页面底边 30px，固定高度；内部列表滚动 */
.ac-card-productlist {
    /* 顶栏 56px + 内容上 padding 24px + 距底 30px = 110px */
    height: calc(100vh - 110px);
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    align-self: stretch;
}

/* 卡片标题固定不滚 */
.ac-card-productlist .ac-card-title {
    flex: 0 0 auto;
}

/* 产品列表区域：占据剩余高度，超出时内部滚动；标题与细线固定不动 */
.ac-card-productlist .ac-product-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

/* 明显的细滚动条，只出现在列表区右侧 */
.ac-card-productlist .ac-product-list::-webkit-scrollbar {
    width: 8px;
}
.ac-card-productlist .ac-product-list::-webkit-scrollbar-thumb {
    background: #c5cad3;
    border-radius: 4px;
}
.ac-card-productlist .ac-product-list::-webkit-scrollbar-thumb:hover {
    background: #1677ff;
}
.ac-card-productlist .ac-product-list::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 4px;
}
.ac-card-productlist .ac-product-list {
    scrollbar-width: thin;
    scrollbar-color: #c5cad3 #f0f2f5;
}

/* ===== 已发布产品列表 ===== */
.ac-product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 列表项：缩略图在左、产品名在右 */
.ac-product-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    background: #fafbff;
    transition: border-color 0.2s;
}

.ac-product-item:hover {
    border-color: #b7d0ff;
}

.ac-product-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f2f7;
    flex-shrink: 0;
}

.ac-product-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ac-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a2233;
    word-break: break-all;
    line-height: 1.4;
}

.ac-product-delete {
    height: 30px;
    padding: 0 14px;
    font-size: 13px;
    font-family: inherit;
    color: #ff4d4f;
    background: #fff;
    border: 1px solid #ffb3b3;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.ac-product-delete:hover {
    background: #ff4d4f;
    color: #fff;
}

.ac-product-delete:disabled {
    background: #f5f5f5;
    color: #bbb;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

/* 编辑按钮 */
.ac-product-edit {
    height: 30px;
    padding: 0 14px;
    font-size: 13px;
    font-family: inherit;
    color: #1677ff;
    background: #fff;
    border: 1px solid #91caff;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.ac-product-edit:hover {
    background: #1677ff;
    color: #fff;
}

/* 正在编辑的行：醒目高亮（蓝边+浅蓝底） */
.ac-product-item.editing {
    border-color: #1677ff;
    background: #e6f0ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}

.ac-empty {
    text-align: center;
    font-size: 14px;
    color: #9aa4b2;
    padding: 40px 0;
}

/* ===== 手机端适配（同后台：侧边栏收窄）===== */
@media (max-width: 768px) {
    .ac-topbar {
        padding: 0 16px;
    }

    .ac-topbar-name {
        font-size: 16px;
    }

    .ac-topbar-company {
        max-width: 120px;
    }

    .ac-sidebar {
        width: 150px;
    }

    .ac-content {
        padding: 16px;
    }

    .ac-card {
        padding: 18px 16px;
    }

    .ac-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ac-submit {
        width: 100%;
    }

    .ac-submit-inline {
        width: auto;
    }

    /* 窄屏：产品管理两栏改为上下堆叠 */
    .ac-product-layout {
        flex-direction: column;
        gap: 16px;
    }

    /* 窄屏：产品列表卡片高度自适应，不占满视口 */
    .ac-card-productlist {
        height: auto;
        max-height: none;
    }

    .ac-card-productlist .ac-product-list {
        flex: none;
        overflow: visible;
    }

    .ac-product-item {
        flex-direction: row;
    }

    .ac-product-thumb {
        width: 48px;
        height: 48px;
    }
}
/* ================= 主办方后台 - 站内信息 ================= */

/* 「站内信息」菜单项上的红点（有未读信息时显示） */
.admin-menu-item {
    position: relative;
}

.msg-red-dot {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5484d;
}

/* 左右布局：左标题列表（窄） + 右详情（宽） */
.msg-layout {
    display: flex;
    gap: 16px;
    align-items: stretch;
    min-height: 420px;
}

/* 左：信息标题列表 */
.msg-list {
    flex: 0 0 300px;
    min-width: 0;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    background: #f7f9fc;
    overflow-y: auto;
    max-height: 560px;
}

/* 单条信息标题：未读有小蓝点 + 加粗 */
.msg-item {
    position: relative;
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #edf1f6;
    font-size: 13px;
    line-height: 1.6;
    color: #1d2939;
    cursor: pointer;
    word-break: break-all;
}

.msg-item:last-child { border-bottom: none; }

.msg-item:hover { background: #eef4ff; }

.msg-item.active {
    background: #e6f0ff;
    color: #1677ff;
    font-weight: 600;
}

/* 未读标记：左侧 4px 竖条 */
.msg-item.unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 2px;
    background: #e5484d;
}

.msg-item.unread { padding-left: 18px; }

.msg-item-date {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #98a2b3;
    font-weight: 400;
}

.msg-item.active .msg-item-date { color: #1677ff; }

/* 空状态 */
.msg-list-empty {
    padding: 24px 12px;
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* 右：信息详情 */
.msg-detail {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    background: #fff;
    padding: 18px 20px;
    overflow-y: auto;
    max-height: 560px;
}

.msg-detail-empty {
    padding: 48px 0;
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* 详情正文 */
.msg-detail-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #1a2233;
    line-height: 1.6;
    word-break: break-all;
}

/* 通过=绿色标题，不通过=红色标题 */
.msg-detail-title.pass { color: #16a34a; }
.msg-detail-title.reject { color: #c73b40; }

.msg-detail-text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.8;
    color: #1d2939;
    word-break: break-all;
}

/* 驳回原因块 */
.msg-detail-reason {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-left: 3px solid #e5484d;
    background: #fef3f3;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.8;
    color: #b42318;
    word-break: break-all;
    white-space: pre-wrap;
}

.msg-detail-reason-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #98a2b3;
}

/* 展会图缩略图 */
.msg-detail-thumb {
    display: block;
    max-width: 360px;
    width: 100%;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    background: #f7f9fc;
}

/* 窄屏折为上下 */
@media (max-width: 900px) {
    .msg-layout { flex-direction: column; }
    .msg-list { flex: none; max-height: 240px; }
}

/* ===== 审核结果气泡通知（organizer.js 轮询发现新审核结果时弹出） ===== */
/* 右上角滑入的 toast：绿色=审核通过已上架，红色=审核不通过；5 秒后自动滑出移除 */
.audit-toast {
    position: fixed;
    top: 18px;
    right: -420px;
    z-index: 3000;
    max-width: 380px;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(16, 24, 40, .18);
    font-size: 14px;
    line-height: 1.6;
    color: #fff;
    background: #16a34a;
    transition: right .4s ease, opacity .4s ease;
    opacity: .95;
}
.audit-toast.reject { background: #e5484d; }
.audit-toast.show { right: 18px; }
.audit-toast:not(.show) { opacity: 0; }
