/* 泓盛泽客服工作台样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif; background: #f0f4f8; color: #1a2b3c; font-size: 14px; }

/* ---- 登录页 ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0D2B4E 0%, #16427A 100%); }
.login-card { background: #fff; border-radius: 14px; padding: 42px 38px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; }
.login-logo { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px; background: linear-gradient(135deg, #FF6B35, #FF8F5E); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.login-card h1 { font-size: 22px; color: #0D2B4E; }
.login-sub { color: #8ba0b5; font-size: 12px; margin: 6px 0 26px; letter-spacing: 1px; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: 13px; color: #5A6C7D; margin: 14px 0 6px; }
.login-card input { width: 100%; padding: 11px 13px; border: 1px solid #d5dee8; border-radius: 8px; font-size: 14px; outline: none; transition: border .2s; }
.login-card input:focus { border-color: #FF6B35; box-shadow: 0 0 0 3px rgba(255,107,53,.12); }
.login-err { color: #e04545; font-size: 13px; margin-top: 12px; }
.btn-primary { width: 100%; margin-top: 22px; background: #FF6B35; color: #fff; border: none; padding: 12px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; }
.btn-primary:hover { background: #e85a28; }
.login-foot { margin-top: 26px; color: #a8b8c8; font-size: 12px; }

/* ---- 顶栏 ---- */
.topbar { height: 56px; background: #0D2B4E; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 50; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.logo-badge { background: #FF6B35; border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 13px; }
.app-title { font-size: 16px; font-weight: 600; }
.super-tag { background: rgba(255,209,102,.18); color: #ffd166; font-size: 12px; padding: 3px 10px; border-radius: 20px; border: 1px solid rgba(255,209,102,.4); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.topbar-right select option { color: #1a2b3c; }
.who { font-size: 13px; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.btn-ghost:hover { background: rgba(255,255,255,.2); }

/* ---- 统计条 ---- */
.stat-strip { display: flex; gap: 14px; padding: 14px 20px; background: #fff; border-bottom: 1px solid #e3eaf2; flex-wrap: wrap; }
.stat { background: #f6f9fc; border-radius: 10px; padding: 10px 22px; min-width: 120px; text-align: center; }
.stat b { display: block; font-size: 22px; color: #0D2B4E; }
.stat span { font-size: 12px; color: #7a8ea3; }

/* ---- 布局 ---- */
.layout { display: flex; min-height: calc(100vh - 56px); }
.sidenav { width: 190px; background: #fff; border-right: 1px solid #e3eaf2; padding: 14px 10px; flex-shrink: 0; }
.nav-item { display: block; padding: 10px 14px; border-radius: 8px; color: #43596e; text-decoration: none; cursor: pointer; margin-bottom: 3px; font-size: 14px; }
.nav-item:hover { background: #f0f4f8; }
.nav-item.active { background: #0D2B4E; color: #fff; }
.badge { background: #FF6B35; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: 6px; }
.content { flex: 1; padding: 22px 26px; overflow-x: auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel h2 { font-size: 17px; color: #0D2B4E; margin-bottom: 14px; }
.hint { color: #7a8ea3; font-size: 13px; margin-bottom: 12px; }

/* ---- 表格 ---- */
.table-wrap { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(13,43,78,.06); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { background: #f4f7fb; color: #5A6C7D; text-align: left; font-size: 12px; padding: 10px 14px; border-bottom: 1px solid #e3eaf2; white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid #eef3f8; font-size: 13px; vertical-align: top; }
.tbl tr:hover td { background: #fafcfe; }
.tbl .muted { color: #9db0c3; }
.tbl .link { color: #FF6B35; font-weight: 600; cursor: pointer; }
.tbl .link:hover { text-decoration: underline; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.tag-open { background: #e8f4fd; color: #1a73c2; }
.tag-assigned { background: #e6f7ee; color: #14855a; }
.tag-replied { background: #f3edff; color: #6a3fc0; }
.tag-closed { background: #f0f2f5; color: #7a8ea3; }
.tag-new { background: #ffeee6; color: #e85a28; }
.tag-done { background: #e6f7ee; color: #14855a; }
.tag-super { background: #fff7dd; color: #a07800; }
.unread { background: #FF6B35; color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.btn-mini { background: #fff; border: 1px solid #d5dee8; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; color: #43596e; }
.btn-mini:hover { border-color: #FF6B35; color: #FF6B35; }
.btn-mini.danger:hover { border-color: #e04545; color: #e04545; }
select.mini { border: 1px solid #d5dee8; border-radius: 6px; padding: 4px 6px; font-size: 12px; }

/* ---- 聊天抽屉 ---- */
.drawer-mask { position: fixed; inset: 0; background: rgba(13,43,78,.45); z-index: 90; }
.drawer { position: fixed; top: 0; right: -540px; width: 520px; max-width: 94vw; height: 100vh; background: #fff; z-index: 100; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.2); transition: right .25s ease; }
.drawer.open { right: 0; }
.drawer-head { background: #0D2B4E; color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.drawer-head b { font-size: 15px; }
.chat-meta { display: block; font-size: 12px; color: #9db8d4; margin-top: 3px; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; background: #f4f7fb; }
.bubble-row { display: flex; margin-bottom: 12px; }
.bubble-row.me { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.bubble-row.visitor .bubble { background: #fff; border: 1px solid #e3eaf2; border-bottom-left-radius: 3px; }
.bubble-row.me .bubble { background: #FF6B35; color: #fff; border-bottom-right-radius: 3px; }
.bubble .b-time { display: block; font-size: 11px; margin-top: 5px; opacity: .65; }
.bubble .b-trans { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(0,0,0,.15); font-size: 12px; color: #5A6C7D; }
.bubble-row.me .bubble .b-trans { color: rgba(255,255,255,.85); border-top-color: rgba(255,255,255,.3); }
.chat-date-divider { text-align: center; color: #9db0c3; font-size: 11px; margin: 14px 0; }
.chat-tools { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid #e3eaf2; background: #fff; flex-wrap: wrap; }
.chat-tools select { flex: 1; min-width: 140px; border: 1px solid #d5dee8; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.translate-out { font-size: 12px; color: #14855a; max-width: 100%; }
.chat-input { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid #e3eaf2; background: #fff; }
.chat-input textarea { flex: 1; border: 1px solid #d5dee8; border-radius: 8px; padding: 9px 11px; font-size: 13px; resize: none; font-family: inherit; outline: none; }
.chat-input textarea:focus { border-color: #FF6B35; }
.chat-input .btn-primary { width: auto; margin-top: 0; padding: 0 22px; }
.empty { text-align: center; color: #9db0c3; padding: 50px 0; font-size: 13px; }
