/* 账号管理页（mg- 前缀）。只用 uc.css 的 --uc-* 令牌与公共类，深色模式随令牌切换。
   Q.menu（qutil.js）的行操作菜单样式 .mg-menu / .mg-pop / .mg-pop-item 也在这里。 */

.mg-lede { margin-bottom: 16px; }

/* 标签条：下划线式，窄屏横向滚动 */
.mg-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--uc-border);
}
.mg-tabs::-webkit-scrollbar { display: none; }
.mg-tab {
    flex: none;
    padding: 10px 16px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--uc-muted);
    font-size: 15px;
    white-space: nowrap;
}
.mg-tab:hover { color: var(--uc-text); }
.mg-tab.on {
    color: var(--uc-primary);
    border-bottom-color: var(--uc-primary);
    font-weight: 600;
}
.mg-body { min-width: 0; display: grid; gap: 16px; }
.mg-body > * { min-width: 0; }
.mg-card { min-width: 0; }
.mg-card > * + * { margin-top: 14px; }
.mg-card > .uc-card-title { margin-bottom: 0; }
.mg-card > .uc-card-desc + * { margin-top: 14px; }

/* 工具栏 */
.mg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mg-toolbar .uc-input,
.mg-toolbar .uc-select { width: auto; min-height: 38px; font-size: 14px; }
.mg-toolbar .uc-input[type="search"] { flex: 1 1 200px; min-width: 160px; max-width: 280px; }
.mg-toolbar .uc-input[type="date"] { flex: 0 1 150px; }
.mg-toolbar .uc-btn { height: 38px; }
.mg-toolbar .uc-card-desc { margin: 0; }

/* 表格 */
.mg-table th:last-child,
.mg-table td:last-child { text-align: left; }
.mg-table th.mg-more,
.mg-table td.mg-more { text-align: right; width: 1%; white-space: nowrap; }
.mg-table td { vertical-align: middle; }
.mg-strong { font-weight: 600; }
.mg-ell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-table td.mg-note {
    padding: 36px 12px;
    text-align: center;
    color: var(--uc-muted);
}
.mg-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.uc-badge.mg-bad { background: var(--uc-danger-soft); color: var(--uc-danger); }
.uc-badge.mg-root { background: var(--uc-text); color: var(--uc-card); }
.mg-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.mg-pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.mg-pager-text { font-size: 13px; color: var(--uc-muted); }

/* 统计卡 */
.mg-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mg-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; }
.mg-stat span { font-size: 13px; color: var(--uc-muted); }
.mg-stat strong { font-size: 24px; font-weight: 700; color: var(--uc-text); }
@media (min-width: 700px) {
    .mg-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 弹窗里的内容 */
.mg-warn {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--uc-warn-soft);
    color: var(--uc-warn);
    font-size: 14px;
    line-height: 1.6;
}
.mg-warn strong { margin-right: 6px; }
.mg-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.mg-meta dt { color: var(--uc-muted); }
.mg-meta dd { margin: 0; overflow-wrap: anywhere; color: var(--uc-text-2); }
.mg-secret {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--uc-panel);
}
.mg-secret code {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: transparent;
    color: var(--uc-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
    user-select: all;
}
.mg-secret-area {
    padding: 10px 12px;
    background: var(--uc-panel);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}
.mg-sub { margin: 16px 0 8px; font-size: 15px; font-weight: 600; }
.mg-sub-section { margin-top: 18px; }
.mg-json {
    margin: 0;
    max-height: 320px;
    padding: 12px 14px;
    overflow: auto;
    border-radius: 10px;
    background: var(--uc-panel);
    color: var(--uc-text-2);
    font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.mg-fb-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--uc-text-2); }
.mg-fb-file { margin-bottom: 12px; }
.mg-fb-fileline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mg-fb-filename { min-width: 0; overflow-wrap: anywhere; }
.mg-fb-img { display: block; max-width: 100%; max-height: 320px; margin-top: 8px; border-radius: 8px; border: 1px solid var(--uc-border, #ddd); }
.mg-detail .uc-table-wrap { margin-top: 4px; }

/* 反馈处理页（feedback.js）：侧栏待处理数、回复记录、写回复 */
.uc-nav-count {
    min-width: 20px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--uc-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}
.fb-replies { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.fb-reply { padding: 12px 14px; border-radius: 10px; background: var(--uc-panel); }
.fb-reply-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.fb-reply.in { background: transparent; border: 1px solid var(--uc-border); }
.fb-reply-subject { margin: 6px 0 4px; font-weight: 600; font-size: 14px; }
.fb-toggle { margin-top: 8px; }
.fb-hw { padding: 14px 16px; border-radius: 10px; background: var(--uc-panel); }
.fb-hw-meta { margin: 0; }
.fb-hw .mg-json { margin-top: 10px; background: var(--uc-card); }
.fb-inbound-files { display: grid; gap: 8px; margin-top: 10px; }
.fb-inbound-file { font-size: 13px; overflow-wrap: anywhere; }
.fb-reply-hint { margin-top: 12px; }
.fb-compose textarea { resize: vertical; min-height: 180px; }
.mg-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* 行末「⋯」按钮与弹出菜单（Q.menu） */
.mg-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--uc-border);
    border-radius: 50%;
    background: var(--uc-card);
    color: var(--uc-text-2);
    cursor: pointer;
}
.mg-more-btn:hover,
.mg-more-btn[aria-expanded="true"] { background: var(--uc-hover); color: var(--uc-text); }
.mg-more-btn .icon { width: 16px; height: 16px; }
.mg-menu { position: relative; display: inline-block; }
.mg-pop {
    min-width: 140px;
    padding: 6px;
    border: 1px solid var(--uc-divider);
    border-radius: 12px;
    background: var(--uc-card);
    box-shadow: var(--uc-shadow);
}
.mg-pop.fixed { position: fixed; left: 0; top: 0; z-index: 60; }
.mg-pop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--uc-text);
    font: inherit;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.mg-pop-item:hover,
.mg-pop-item:focus-visible { background: var(--uc-hover); }
.mg-pop-item .icon { width: 16px; height: 16px; color: var(--uc-muted); }
.mg-pop-item.danger { color: var(--uc-danger); }
.mg-pop-item.danger .icon { color: var(--uc-danger); }
.mg-pop-item.danger:hover { background: var(--uc-danger-soft); }
.mg-pop-item:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 640px) {
    .mg-toolbar .uc-input[type="search"] { max-width: none; }
    .mg-toolbar .uc-select { flex: 1 1 120px; }
    .mg-tab { padding: 10px 12px; font-size: 14px; }
    .mg-meta { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .mg-meta dd { margin-bottom: 8px; }
}
