/* ============ 基础：主题变量 / 重置 / 布局 / 通用控件 ============ */
/* 白色底色 + 橙系点缀（#FE5204 橙红 · #FC8A03 橙 · #FAB942 金黄 · #272D36 深灰文字） */
:root {
  --bg: #ffffff;                 /* 页面底色（白） */
  --bg-panel: #ffffff;           /* 面板/卡片（白） */
  --bg-deep: #f7f8fa;            /* 输入框/浅色块 */
  --bg-hover: #fff6ef;           /* 悬停淡橙 */
  --border: #eceff3;
  --border-strong: #dde2e8;
  --text: #272d36;               /* 主文字（深灰，取自色板 39,45,54） */
  --text-dim: #4b5563;
  --text-faint: #8b96a3;
  --accent: #fe5204;             /* 点缀：橙红 */
  --accent-2: #fc8a03;           /* 点缀：橙 */
  --gold: #b45309;               /* 点缀：金黄文字态（深一档保证白底可读） */
  --gold-bg: #fab942;            /* 金黄（渐变/背景用） */
  --grad-main: linear-gradient(to bottom right, #fe5204, #fc8a03);
  --grad-gold: linear-gradient(to bottom right, #fc8a03, #fab942);
  --green: #16a34a;              /* 状态语义色（成功） */
  --red: #ef4444;                /* 状态语义色（危险） */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Microsoft YaHei', '微软雅黑', Arial, 'Hiragino Sans GB', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.hidden { display: none !important; }

/* ---- 通用按钮 ---- */
.btn-primary {
  height: 44px; padding: 0 18px; border: none; border-radius: 6px; cursor: pointer;
  background: var(--grad-main); color: #fff; font-size: 16px; font-weight: 600;
  transition: filter .15s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary.small { height: 32px; padding: 0 14px; font-size: 13px; }

.btn-call {
  height: 44px; padding: 0 24px; border: none; border-radius: 6px; cursor: pointer;
  background: var(--grad-main); color: #fff; font-size: 16px; font-weight: 600;
}
.btn-call:hover { filter: brightness(1.1); }
.btn-call:disabled { opacity: .6; cursor: not-allowed; }
.btn-call.small { height: 28px; padding: 0 12px; font-size: 12px; }

.btn-plain {
  height: 32px; padding: 0 12px; border-radius: 6px; cursor: pointer;
  background: #fff; color: var(--text-dim); border: 1px solid var(--border-strong); font-size: 13px;
}
.btn-plain:hover { border-color: var(--accent-2); color: var(--accent); }
.btn-plain.small { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---- 输入框 ---- */
input[type="text"], input[type="password"] {
  height: 44px; padding: 0 14px; font-size: 15px;
  background: var(--bg-deep); border: 1px solid var(--border-strong); border-radius: 6px;
  color: var(--text); outline: none; transition: border-color .15s;
}
input[type="text"]:focus, input[type="password"]:focus { border-color: var(--accent-2); }
input::placeholder { color: #9aa5b1; }

/* ---- 徽标 / 状态胶囊 ---- */
.badge {
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  background: #fff4e8; color: var(--gold); border: 1px solid #ffe0bd;
}
.pill {
  padding: 3px 12px; border-radius: 999px; font-size: 12px;
  background: #f1f3f6; color: var(--text-dim);
}
.pill.calling { background: #fff4e0; color: #c27407; border: 1px solid #ffe0a3; }
.pill.done { background: #e9f9f0; color: #15803d; border: 1px solid #bfe8d0; }

/* ---- 应用布局 ---- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 190px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 24px 0 16px;
}
.logo {
  font-size: 22px; font-weight: 700; letter-spacing: 2px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-2);
  text-align: center;
}
.sidebar .logo { margin-bottom: 30px; padding: 0 20px; }
.sidebar .logo img {
  width: 150px; height: auto; display: block; margin: 0 auto;
  border-radius: 8px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 6px; padding: 0 12px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 8px; cursor: pointer;
  color: var(--text-dim); text-decoration: none; transition: all .15s;
}
.sidebar nav a:hover { background: var(--bg-hover); color: var(--accent); }
.sidebar nav a.active {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 4px 12px rgba(254, 82, 4, .25);
}
.sidebar .ico { font-size: 16px; }
.side-foot { margin-top: auto; padding: 14px 16px 0; border-top: 1px solid var(--border); }
.side-user { color: var(--text); font-weight: 600; margin-bottom: 8px; }
.side-logout { color: var(--text-faint); cursor: pointer; font-size: 13px; }
.side-logout:hover { color: var(--red); }

.content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; background: #fff; border-bottom: 1px solid var(--border);
}
.top-title {
  font-size: 16px; font-weight: 700; display: flex; align-items: center;
}
.top-title::before {
  content: ""; height: 18px; width: 4px; border-radius: 3px;
  background: var(--grad-main); margin-right: 12px;
}
.top-right { display: flex; gap: 10px; }
.page { padding: 22px 24px; overflow-y: auto; }
