/* ===== VCloud HR · 深色主题 ===== */
:root{
  --bg:#0e1116;
  --bg-2:#141922;
  --bg-3:#1b2230;
  --line:#252d3b;
  --line-2:#323c4d;
  --text:#e8edf5;
  --text-2:#98a4b8;
  --text-3:#6b7688;
  --blue:#2f6bff;
  --blue-2:#5b8cff;
  --blue-dim:rgba(47,107,255,.14);
  --green:#22c55e;
  --red:#ef4444;
  --amber:#f59e0b;
  --purple:#a855f7;
  --radius:10px;
  --shadow:0 8px 30px rgba(0,0,0,.45);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  background:var(--bg);
  color:var(--text);
  font-family:"Microsoft YaHei","PingFang SC","Helvetica Neue",Arial,sans-serif;
  font-size:14px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
.hidden{display:none !important}
a{cursor:pointer}
h1,h2,h3,h4{font-weight:600;line-height:1.3}

/* ---------- 登录 ---------- */
.login-wrap{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:
    radial-gradient(900px 500px at 15% -10%,rgba(47,107,255,.20),transparent 60%),
    radial-gradient(700px 400px at 95% 110%,rgba(168,85,247,.13),transparent 60%),
    var(--bg);
  padding:24px;
}
.login-card{
  width:100%;max-width:400px;background:var(--bg-2);
  border:1px solid var(--line);border-radius:16px;
  padding:32px 28px 24px;box-shadow:var(--shadow);
}
.brand{text-align:center;margin-bottom:22px}
.brand-mark{display:flex;justify-content:center;margin-bottom:10px}
.brand h1{font-size:21px;letter-spacing:.5px}
.brand p{color:var(--text-3);font-size:12px;margin-top:4px;letter-spacing:1px}
.tabs{display:flex;gap:4px;background:var(--bg-3);padding:4px;border-radius:9px;margin-bottom:20px}
.tab{
  flex:1;padding:8px 4px;border:0;background:transparent;color:var(--text-2);
  font-size:13px;border-radius:7px;cursor:pointer;font-family:inherit;transition:.15s;
}
.tab:hover{color:var(--text)}
.tab.active{background:var(--blue);color:#fff;font-weight:600}
.auth-form{display:flex;flex-direction:column;gap:14px}
.auth-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--text-2)}
input,select,textarea{
  background:var(--bg-3);border:1px solid var(--line-2);border-radius:8px;
  color:var(--text);padding:10px 12px;font-size:14px;font-family:inherit;
  outline:none;transition:.15s;width:100%;
}
input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-dim)}
input::placeholder{color:var(--text-3)}
.code-row{display:flex;gap:8px}
.code-row input{flex:1}
.btn{
  border:1px solid transparent;border-radius:8px;padding:10px 16px;font-size:14px;
  font-family:inherit;cursor:pointer;transition:.15s;white-space:nowrap;
}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--blue);color:#fff;font-weight:600}
.btn-primary:hover:not(:disabled){background:var(--blue-2)}
.btn-ghost{background:var(--bg-3);color:var(--text-2);border-color:var(--line-2)}
.btn-ghost:hover:not(:disabled){color:var(--text);border-color:var(--text-3)}
.btn-danger{background:transparent;color:var(--red);border-color:rgba(239,68,68,.4)}
.btn-danger:hover:not(:disabled){background:rgba(239,68,68,.1)}
.btn-block{width:100%}
.btn-sm{padding:6px 12px;font-size:13px}
.link-btn{background:none;border:0;color:var(--text-3);font-size:12px;cursor:pointer;font-family:inherit;padding:2px}
.link-btn:hover{color:var(--blue-2)}
.msg{font-size:13px;margin-top:14px;text-align:center;min-height:18px}
.msg.err{color:#ff8b8b}
.msg.ok{color:#7ee2a8}

/* ---------- 应用骨架 ---------- */
.app{display:flex;height:100vh;overflow:hidden}
.sidebar{
  width:228px;flex-shrink:0;background:var(--bg-2);border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:18px 14px;
}
.side-brand{display:flex;align-items:center;gap:10px;padding:0 6px 20px;border-bottom:1px solid var(--line);margin-bottom:14px}
.side-brand strong{display:block;font-size:14px}
.side-brand span{font-size:11px;color:var(--text-3);letter-spacing:.6px}
.side-nav{display:flex;flex-direction:column;gap:3px;flex:1}
.nav-item{
  display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;
  color:var(--text-2);font-size:14px;text-decoration:none;transition:.15s;cursor:pointer;
}
.nav-item i{font-style:normal;width:16px;text-align:center;opacity:.75;font-size:13px}
.nav-item:hover{background:var(--bg-3);color:var(--text)}
.nav-item.active{background:var(--blue-dim);color:var(--blue-2);font-weight:600}
.nav-item.active i{opacity:1}
.side-foot{border-top:1px solid var(--line);padding-top:14px;display:flex;flex-direction:column;gap:10px}
.me{display:flex;align-items:center;gap:9px;padding:0 4px}
.avatar{
  width:34px;height:34px;border-radius:50%;background:var(--blue);flex-shrink:0;
  display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;color:#fff;
  background-size:cover;background-position:center;
}
.me-info{overflow:hidden}
.me-info strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me-info span{font-size:11px;color:var(--text-3)}
.main{flex:1;display:flex;flex-direction:column;overflow:hidden}
.topbar{
  height:62px;flex-shrink:0;border-bottom:1px solid var(--line);background:var(--bg-2);
  display:flex;align-items:center;justify-content:space-between;padding:0 24px;
}
.topbar h2{font-size:17px}
.topbar-right{display:flex;align-items:center;gap:12px}
.pill{
  background:var(--bg-3);border:1px solid var(--line-2);border-radius:20px;
  padding:4px 12px;font-size:12px;color:var(--text-2);
}
.content{flex:1;overflow:auto;padding:24px}
.view{max-width:1360px;margin:0 auto}

/* ---------- 卡片 / 栅格 ---------- */
.card{background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:18px}
.card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:12px;flex-wrap:wrap}
.card-head h3{font-size:15px}
.card-head .sub{font-size:12px;color:var(--text-3);font-weight:400;margin-left:8px}
.grid{display:grid;gap:16px}
.g-2{grid-template-columns:repeat(2,1fr)}
.g-3{grid-template-columns:repeat(3,1fr)}
.g-4{grid-template-columns:repeat(4,1fr)}
.g-5{grid-template-columns:repeat(5,1fr)}
@media(max-width:1180px){.g-4,.g-5{grid-template-columns:repeat(2,1fr)}.g-3{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.g-2,.g-3,.g-4,.g-5{grid-template-columns:1fr}}

.stat{background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.stat .k{font-size:12px;color:var(--text-3);margin-bottom:8px}
.stat .v{font-size:25px;font-weight:600;letter-spacing:-.5px}
.stat .v small{font-size:13px;font-weight:400;color:var(--text-3);margin-left:3px}
.stat .d{font-size:12px;color:var(--text-3);margin-top:6px}
.stat.accent{border-color:rgba(47,107,255,.35);background:linear-gradient(180deg,rgba(47,107,255,.09),transparent)}

/* ---------- 表格 ---------- */
.tbl-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:var(--bg-2)}
table{width:100%;border-collapse:collapse;font-size:13.5px;min-width:640px}
thead th{
  text-align:left;padding:11px 14px;background:var(--bg-3);color:var(--text-2);
  font-weight:600;font-size:12.5px;white-space:nowrap;position:sticky;top:0;z-index:1;
  border-bottom:1px solid var(--line-2);
}
tbody td{padding:11px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:rgba(255,255,255,.022)}
.num{text-align:right;font-variant-numeric:tabular-nums}
.mono{font-variant-numeric:tabular-nums;letter-spacing:.2px}
.empty{padding:54px 20px;text-align:center;color:var(--text-3)}
.empty .big{font-size:30px;opacity:.35;margin-bottom:10px}

/* ---------- 头像 / 标签 ---------- */
.emp-cell{display:flex;align-items:center;gap:10px}
.emp-photo{
  width:38px;height:38px;border-radius:9px;flex-shrink:0;object-fit:cover;
  background:var(--bg-3);border:1px solid var(--line-2);
  display:flex;align-items:center;justify-content:center;color:var(--text-3);font-size:14px;
}
.emp-photo.big{width:96px;height:120px;border-radius:10px;font-size:30px}
.tag{
  display:inline-block;padding:2px 9px;border-radius:20px;font-size:11.5px;
  background:var(--bg-3);border:1px solid var(--line-2);color:var(--text-2);white-space:nowrap;
}
.tag.blue{background:var(--blue-dim);border-color:rgba(47,107,255,.35);color:var(--blue-2)}
.tag.green{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.32);color:#5ee08a}
.tag.amber{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.32);color:#fbbf5c}
.tag.red{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.32);color:#ff9a9a}
.tag.purple{background:rgba(168,85,247,.13);border-color:rgba(168,85,247,.32);color:#c99bff}

/* ---------- 工具条 ---------- */
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.toolbar input,.toolbar select{width:auto;min-width:130px}
.toolbar .grow{flex:1;min-width:190px}
.toolbar .spacer{flex:1}

/* ---------- 抽屉 ---------- */
.drawer-mask{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:60;display:flex;justify-content:flex-end}
.drawer{
  width:min(620px,100%);height:100%;background:var(--bg);border-left:1px solid var(--line-2);
  display:flex;flex-direction:column;animation:slideIn .22s ease;
}
@keyframes slideIn{from{transform:translateX(30px);opacity:.4}to{transform:none;opacity:1}}
.drawer-head{
  height:60px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;
  padding:0 20px;border-bottom:1px solid var(--line);background:var(--bg-2);
}
.drawer-head h3{font-size:16px}
.drawer-body{flex:1;overflow:auto;padding:20px}
.drawer-foot{
  flex-shrink:0;padding:14px 20px;border-top:1px solid var(--line);background:var(--bg-2);
  display:flex;gap:10px;justify-content:flex-end;
}
.icon-btn{
  background:none;border:0;color:var(--text-3);font-size:16px;cursor:pointer;
  padding:6px 8px;border-radius:6px;font-family:inherit;
}
.icon-btn:hover{background:var(--bg-3);color:var(--text)}

/* ---------- 表单 ---------- */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid .full{grid-column:1/-1}
@media(max-width:620px){.form-grid{grid-template-columns:1fr}}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:12.5px;color:var(--text-2);font-weight:400}
.field label .req{color:var(--red);margin-left:2px}
.field-hint{font-size:11.5px;color:var(--text-3)}
.section-title{
  font-size:12.5px;color:var(--text-3);letter-spacing:1px;text-transform:uppercase;
  margin:22px 0 12px;padding-bottom:8px;border-bottom:1px solid var(--line);
}
.section-title:first-child{margin-top:0}
.photo-upload{display:flex;gap:16px;align-items:flex-start}
.photo-box{
  width:96px;height:120px;border-radius:10px;border:1px dashed var(--line-2);
  background:var(--bg-3);display:flex;align-items:center;justify-content:center;
  overflow:hidden;flex-shrink:0;color:var(--text-3);font-size:12px;text-align:center;
}
.photo-box img{width:100%;height:100%;object-fit:cover}

/* ---------- 弹窗 ---------- */
.modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:70;display:flex;align-items:center;justify-content:center;padding:24px}
.modal{
  width:min(560px,100%);max-height:85vh;background:var(--bg-2);border:1px solid var(--line-2);
  border-radius:14px;display:flex;flex-direction:column;box-shadow:var(--shadow);
  animation:pop .18s ease;
}
@keyframes pop{from{transform:scale(.97);opacity:.5}to{transform:none;opacity:1}}
.modal-head{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.modal-head h3{font-size:15.5px}
.modal-body{padding:20px;overflow:auto;font-size:13.5px;color:var(--text-2)}
.modal-body .kv{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;font-size:13.5px}
.modal-body .kv .k{color:var(--text-3)}
.modal-body .kv .v{color:var(--text)}
.modal-foot{padding:14px 20px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end}

/* ---------- 提示条 ---------- */
.toast{
  position:fixed;bottom:26px;left:50%;transform:translateX(-50%);
  background:var(--bg-3);border:1px solid var(--line-2);color:var(--text);
  padding:11px 20px;border-radius:9px;font-size:13.5px;z-index:90;
  box-shadow:var(--shadow);animation:pop .18s ease;
}
.toast.err{border-color:rgba(239,68,68,.5);color:#ffb4b4}
.toast.ok{border-color:rgba(34,197,94,.45);color:#a7edc3}

/* ---------- 工资条 ---------- */
.payslip{background:var(--bg-3);border:1px solid var(--line-2);border-radius:10px;padding:16px;margin-bottom:12px}
.payslip h4{font-size:13.5px;margin-bottom:12px;color:var(--text-2);display:flex;justify-content:space-between}
.payslip .line{display:flex;justify-content:space-between;padding:5px 0;font-size:13px;color:var(--text-2)}
.payslip .line.total{border-top:1px solid var(--line-2);margin-top:8px;padding-top:10px;font-weight:600;color:var(--text);font-size:14px}
.payslip .line .minus{color:#ff9a9a}
.payslip .line .plus{color:#7ee2a8}

/* ---------- 进度条 ---------- */
.bar{height:6px;background:var(--bg-3);border-radius:4px;overflow:hidden;margin-top:6px}
.bar i{display:block;height:100%;background:var(--blue);border-radius:4px}

/* ---------- 侧滚 ---------- */
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:5px}
::-webkit-scrollbar-thumb:hover{background:#3d4a5e}
