/* 即刻短剧：各页共用的外壳样式（顶栏、提示条、表单、上传、加载中），员工页和管理后台都用。
   配色、卡片、按钮这些基础在 style.css（照技能预览页搬来的），这里只补 ui.js 和表单要用的，页面专用的样式放各页自己的 css。 */

/* ---------- 顶栏（ui.js 的 UI.header 画的） ---------- */
.topbar .nav { flex-wrap: nowrap; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--on-accent); font: 500 15px/1 var(--serif); max-width: none; overflow: visible; }
.topbar .icon-btn { font-size: 17px; }

/* ---------- 右下角的短提示（UI.toast） ---------- */
#toast-box { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { max-width: min(400px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 10px; background: var(--card); color: var(--text);
  border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere;
  pointer-events: auto; animation: toast-in .2s ease-out; transition: opacity .3s, transform .3s; }
.toast.ok { border-left: 3px solid var(--success); }
.toast.bad { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 表单 ---------- */
input[type=text], input[type=password], input[type=number], input[type=email], input[type=url], input:not([type]) {
  width: 100%; min-width: 0; height: 36px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text); font: 14px var(--sans); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; flex: none; }
input[type=file] { font: 13px var(--sans); color: var(--muted); max-width: 100%; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 13px; font-weight: 500; }
.field .opt-tag { font-weight: 400; color: var(--faint); margin-left: 4px; }
.field .hint { font-size: 12px; color: var(--muted); }
.field select { width: 100%; }
.field textarea { font-size: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin-top: 4px; }
.counter { font-size: 12px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); }
.form-err { font-size: 13px; color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-sm); padding: 8px 12px; }
.btn.block { width: 100%; height: 40px; font-size: 15px; }

/* 文件拖放区：<label class="drop"> 里放隐藏的 <input type=file> */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 18px; text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--muted); cursor: pointer;
  transition: border-color .15s, background .15s; min-width: 0; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.has { border-style: solid; border-color: var(--border-strong); background: var(--card); }
.drop .big { font: 500 16px/1.4 var(--serif); color: var(--text); overflow-wrap: anywhere; }
.drop .small { font-size: 13px; }
.drop svg { color: var(--accent); }
.drop.sm { padding: 16px 14px; }
.drop.sm .big { font-size: 14px; font-family: var(--sans); }
.drop input[type=file] { display: none; }

/* 进度条：<div class="bar"><i style="width:40%"></i></div> */
.bar { height: 6px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .25s ease-out; }
.bar.ok > i { background: var(--success); }
.bar.thin { height: 4px; }

/* 按钮加载中 */
.btn.busy { pointer-events: none; }
.btn.busy::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 空状态 */
.empty { text-align: center; padding: 48px 24px; }
.empty .big { font: 500 20px/1.4 var(--serif); margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto; }
.empty .row { justify-content: center; margin-top: 18px; }

/* 页面整块出错、没找到 */
.page-msg { max-width: 560px; margin: 48px auto; }

@media (max-width: 640px) {
  #toast-box { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
  .topbar .row.tight .small { display: none; }
}
