/* 机架预约平台 - 全局样式 */
:root {
  --bg: #0f1420;
  --card: #1a2234;
  --card2: #212c44;
  --line: #2c3a58;
  --text: #e6ebf5;
  --muted: #8b98b3;
  --primary: #3b82f6;
  --primary2: #2563eb;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
  --blue: #60a5fa;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }

/* ---------- 登录页（大厂风格） ---------- */
.login-body {
  margin: 0; padding: 0; min-height: 100vh; overflow: hidden;
  background: #f5f7fb;
}
.login-wrap {
  display: flex; min-height: 100vh; width: 100%;
}

/* 左侧品牌区 */
.login-brand {
  position: relative; flex: 1.15; min-width: 0; overflow: hidden;
  background: linear-gradient(135deg, #0b1530 0%, #10265c 45%, #1e3a8a 78%, #2749a5 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 72px; color: #fff;
}
.brand-bg { position: absolute; inset: 0; pointer-events: none; }
.brand-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 30%, transparent 75%);
}
.brand-glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
}
.brand-glow.g1 { width: 420px; height: 420px; background: #3b82f6; top: -120px; right: -80px; }
.brand-glow.g2 { width: 360px; height: 360px; background: #6366f1; bottom: -140px; left: -60px; opacity: .4; }
.brand-content { position: relative; z-index: 1; max-width: 520px; }
.brand-logo { font-size: 20px; font-weight: 700; letter-spacing: .5px; margin-bottom: 48px; }
.login-brand h1 {
  font-size: 44px; line-height: 1.25; font-weight: 700; margin: 0 0 18px;
  letter-spacing: 1px;
}
.brand-slogan { font-size: 15px; color: rgba(255,255,255,.78); margin-bottom: 36px; }
.brand-features { list-style: none; padding: 0; margin: 0; }
.brand-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,.88); padding: 7px 0;
}
.brand-features .tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: rgba(59,130,246,.9); color: #fff; font-size: 12px; font-weight: 700;
}
.brand-foot { position: absolute; bottom: 28px; left: 72px; font-size: 12px; color: rgba(255,255,255,.45); }

/* 右侧登录卡片 */
.login-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 48px 32px; background: #f5f7fb;
}
.login-panel-inner {
  width: 100%; max-width: 400px; background: #fff;
  border-radius: 16px; padding: 44px 40px;
  box-shadow: 0 8px 40px rgba(23, 43, 99, .10), 0 1px 3px rgba(23, 43, 99, .06);
}
.panel-logo {
  width: 52px; height: 52px; border-radius: 14px; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .35); margin-bottom: 22px;
}
.login-panel h2 { font-size: 24px; font-weight: 700; color: #111a2e; margin: 0 0 6px; }
.panel-sub { font-size: 13px; color: #8492a8; margin: 0 0 26px; }

.login-panel .field {
  position: relative; margin-bottom: 16px;
}
.login-panel .field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px; opacity: .55; pointer-events: none;
}
.login-panel .field input {
  width: 100%; padding: 12px 14px 12px 42px; font-size: 14px; color: #111a2e;
  background: #f7f9fc; border: 1px solid #dfe5ee; border-radius: 10px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-panel .field input::placeholder { color: #a3aec2; }
.login-panel .field input:focus {
  border-color: #2563eb; background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.field-extra { margin: 4px 0 20px; text-align: left; }
.login-panel .sm { font-size: 12px; color: #9aa7bd; }

.btn-login {
  width: 100%; padding: 13px; font-size: 15px; font-weight: 600; letter-spacing: 4px;
  color: #fff; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .32);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn-login:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(37,99,235,.42); }
.btn-login:active { transform: translateY(1px); }

.panel-divider {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 12px;
  color: #b6c0d2; font-size: 12px;
}
.panel-divider::before, .panel-divider::after {
  content: ""; flex: 1; height: 1px; background: #e8edf4;
}
.panel-secure {
  margin: 0; font-size: 12px; color: #9aa7bd; text-align: center;
}

.login-panel .alert.error {
  margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; text-align: left;
}

/* 响应式：窄屏隐藏左侧品牌区 */
@media (max-width: 900px) {
  .login-brand { display: none; }
  .login-panel { padding: 24px 16px; }
  .login-panel-inner { padding: 36px 28px; }
}

/* ---------- 顶部栏 & 标签 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-size: 17px; font-weight: 600; }
.tag {
  font-size: 12px; background: var(--primary2); color: #fff; border-radius: 6px;
  padding: 2px 8px; margin-left: 8px; vertical-align: 2px;
}
.userbox { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.tabs {
  display: flex; gap: 4px; padding: 10px 24px; background: var(--card);
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.tab {
  padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 14px;
}
.tab:hover { background: var(--card2); color: var(--text); }
.tab.active { background: var(--primary2); color: #fff; }

/* ---------- 布局 ---------- */
.container { max-width: 1080px; margin: 24px auto; padding: 0 24px; }
.panel { display: none; }
.panel.active { display: block; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px;
}
.card h2 { font-size: 17px; margin-bottom: 10px; }
.card h3 { font-size: 14px; color: var(--muted); margin: 16px 0 10px; }
.muted { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.row label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.row input[type="number"], .row input[type="date"] {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 14px; outline: none;
}
.row input:focus { border-color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn {
  padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 14px; background: var(--card2); color: var(--text); transition: .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary2); color: #fff; }
.btn.danger { background: rgba(239,68,68,.15); color: var(--red); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; padding: 12px; font-size: 16px; margin-top: 6px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 500; font-size: 13px; }
.table tr:hover td { background: rgba(59,130,246,.05); }
.empty { text-align: center; color: var(--muted); padding: 24px !important; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  background: var(--card2); color: var(--muted);
}
.badge.blue { background: rgba(96,165,250,.15); color: var(--blue); }
.badge.green { background: rgba(34,197,94,.15); color: var(--green); }
.badge.red { background: rgba(239,68,68,.15); color: var(--red); }
.badge.orange { background: rgba(245,158,11,.15); color: var(--orange); }
.badge.gray { background: var(--card2); color: var(--muted); }

/* ---------- 生成结果 ---------- */
.hidden { display: none !important; }
.gen-result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.gen-result .row h3 { margin: 0; color: var(--text); font-size: 15px; }
.gen-result .table { max-height: 320px; overflow: auto; display: block; }

/* ---------- 时段网格 ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.slot-hour {
  display: flex; align-items: center; gap: 8px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.slot-time { font-weight: 600; font-size: 14px; min-width: 92px; }
.slot-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); cursor: pointer; font-size: 13px;
  transition: .12s;
}
.slot-btn:hover:not(:disabled) { border-color: var(--primary); }
.slot-btn.sel { border-color: var(--primary); background: rgba(59,130,246,.18); }
.slot-btn.mine { border-color: var(--green); background: rgba(34,197,94,.12); }
.slot-btn.dis { opacity: .38; cursor: not-allowed; }
.slot-btn.full .slot-avail { color: var(--red); }
.slot-avail { color: var(--green); font-size: 11px; }
.slot-name { font-weight: 600; }
.pick-info {
  margin-top: 14px; padding: 12px 16px; background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.4); border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
}
.pick-info .btn { margin-left: auto; }

/* ---------- 系统设置 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form-grid input {
  padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 14px; outline: none;
}

/* ---------- 提醒弹窗 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 99;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 36px; max-width: 420px; width: 90%; text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.modal-box.alarm { border-color: var(--orange); }
.alarm-icon { font-size: 56px; animation: shake .6s infinite; }
@keyframes shake {
  0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); }
}
.modal-box h2 { margin: 10px 0; }
.modal-box p { color: var(--muted); font-size: 15px; margin-bottom: 20px; line-height: 1.6; }

/* ---------- 提示 ---------- */
.alert {
  padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px;
}
.alert.error { background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.35); }
