/* 皮皮管理系统 - 公共样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f1117;
  --bg2:       #1a1d27;
  --bg3:       #22263a;
  --border:    #2e3354;
  --accent:    #4f8ef7;
  --accent2:   #3d73e0;
  --danger:    #e05252;
  --warning:   #f0a500;
  --success:   #3ecf8e;
  --text:      #e8eaf0;
  --text2:     #8892b0;
  --text3:     #4a5380;
  --radius:    8px;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

input, select, textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
  width: 100%;
  outline: none;
  transition: border .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder { color: var(--text3); }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  border: none; cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
button:hover, .btn:hover { opacity: .85; }
button:active { transform: scale(.97); }

.btn-primary  { background: var(--accent);  color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-warning  { background: var(--warning); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-ghost    { background: transparent; border: 1px solid var(--border); color: var(--text2); }
.btn-sm       { padding: 5px 12px; font-size: 12px; }

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.badge-green  { background: rgba(62,207,142,.15); color: var(--success); }
.badge-red    { background: rgba(224,82,82,.15);  color: var(--danger); }
.badge-yellow { background: rgba(240,165,0,.15);  color: var(--warning); }
.badge-blue   { background: rgba(79,142,247,.15); color: var(--accent); }
.badge-gray   { background: rgba(74,83,128,.2);   color: var(--text3); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text2); font-weight: 500; font-size: 12px; background: var(--bg3); }
tr:hover td { background: rgba(255,255,255,.02); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text2); font-size: 13px; }

.alert {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.alert-danger  { background: rgba(224,82,82,.12);  border: 1px solid rgba(224,82,82,.3);  color: #f87171; }
.alert-warning { background: rgba(240,165,0,.12);  border: 1px solid rgba(240,165,0,.3);  color: #fbbf24; }
.alert-success { background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.3); color: #34d399; }

/* 弹窗遮罩 */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px; min-width: 340px; max-width: 95vw;
  box-shadow: var(--shadow);
}
.modal-box h3 { margin-bottom: 20px; font-size: 16px; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* 工具类 */
.text-muted  { color: var(--text2); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.text-warning{ color: var(--warning); }
.mt-16 { margin-top: 16px; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12{ gap: 12px; }
.w100  { width: 100%; }
