﻿/* ==================== 全局样式 ==================== */
:root {
    --sidebar-width: 200px;
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;

    /* 品牌标识统一规范：跨页面（落地页/登录页/侧边栏）“科纪通”品牌名与标记尺寸一致 */
    --brand-name: 18px;
    --brand-name-weight: 800;
    --brand-mark: 20px;
    --brand-sub: 12px;

/* ===== 科纪广场模式（交易平台皮肤，青绿主色，区别于公司蓝）===== */
body.plaza-mode {
    --primary: #0d9488;
    --primary-light: #ccfbf1;
    --primary-dark: #0f766e;
}
body.plaza-mode .sidebar { background: #0f172a; }
body.plaza-mode .sidebar-header { border-color: rgba(255,255,255,.1); }
body.plaza-mode .sidebar .nav-link { color: #cbd5e1; }
body.plaza-mode .sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
body.plaza-mode .sidebar .nav-link.active { background: rgba(13,148,136,.22); color: #5eead4; }
body.plaza-mode .sidebar .logo i,
body.plaza-mode .sidebar .logo #tenantBrandName { color: #5eead4; }
body.plaza-mode .sidebar-footer { border-color: rgba(255,255,255,.1); color: #94a3b8; }

/* 顶栏模式切换开关 */
.mode-switch {
    display: flex; justify-content: flex-end; align-items: center; gap: 8px;
    margin-top: 12px; padding: 4px 6px;
    background: #f1f5f9; border-radius: 9px;
}
body.plaza-mode .mode-switch { background: rgba(255,255,255,.08); }
.mode-btn {
    border: none; background: #fff; cursor: pointer;
    padding: 6px 12px; border-radius: 6px; font-size: 12px; color: #475569;
    transition: all .15s; box-shadow: 0 1px 3px rgba(0,0,0,.12);
    white-space: nowrap;
}
.mode-btn:hover { background: #e2e8f0; color: #1e293b; }
body.plaza-mode .mode-btn { background: #0d9488; color: #fff; }
body.plaza-mode .mode-btn:hover { background: #0f766e; color: #fff; }

/* 科纪广场 · 交易大厅卡片 */
.plaza-hall-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #fff;
}
.plaza-hall-header .bh-title { font-size: 20px; font-weight: 700; }
.plaza-hall-header .bh-sub { font-size: 13px; opacity: .85; margin-top: 4px; }
.plaza-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; padding: 20px 24px;
}
.plaza-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05); transition: transform .12s, box-shadow .12s;
    cursor: pointer;
}
.plaza-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,148,136,.18); }
.plaza-card-title { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 10px; }
.plaza-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.plaza-card-line { font-size: 13px; color: #475569; margin-top: 5px; }
.plaza-card-line b { color: #0f172a; font-weight: 600; }
.plaza-empty { text-align: center; color: #94a3b8; padding: 60px 20px; }

    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0891b2;
    --info-light: #cffafe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    font-size: 14px;
    line-height: 1.6;
}

#app { display: flex; height: 100vh; }

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    pointer-events: auto;
}
/* 防御：确保侧边栏及导航项始终可点，不被任何隐性覆盖层吞掉点击 */
.sidebar * { pointer-events: auto; }

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 侧边栏导航徽章 */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: auto;
    line-height: 1;
}

/* 消息中心页面 */
.message-center-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border, #e2e8f0);
    margin-bottom: 16px;
}

.message-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}

.message-tab:hover {
    color: var(--primary, #4f46e5);
}

.message-tab.active {
    color: var(--primary, #4f46e5);
    border-bottom-color: var(--primary, #4f46e5);
}

.message-card {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #f1f5f9);
    cursor: pointer;
    transition: background .15s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-card:hover { background: var(--hover-bg, #f8fafc); }
.message-card.unread { background: #eff6ff; border-left: 3px solid var(--primary, #4f46e5); }
.message-card.unread:hover { background: #dbeafe; }

.message-card-del {
    margin-left: 4px;
    flex: 0 0 auto;
    align-self: flex-start;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 1rem;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    opacity: .55;
    transition: opacity .15s, color .15s, background .15s;
}
.message-card:hover .message-card-del,
.message-card-del:focus { opacity: 1; }
.message-card-del:hover { color: #dc2626; background: #fee2e2; }

.message-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

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

.message-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-card-type {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary, #4f46e5);
    background: #eef2ff;
    padding: 1px 8px;
    border-radius: 10px;
}

.message-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
}

.message-card-time {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
}

.message-card-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.message-card-text {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
}


/* 实时转写 partial（真流式未固化文本）：灰色 + 闪烁光标，示意「还在被改写」。
   与 Vue 版 AudioTranscribePage.vue scoped 样式同语义；native audio-record.js 用。 */
.kj-audio__live-partial { color: #868e96; }
.kj-audio__live-partial::after { content: '▍'; color: #adb5bd; animation: kj-live-caret 1s steps(2) infinite; }
@keyframes kj-live-caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
