/* ============================================================
   Mountex 安全檔案上載 — 樣式
   中性專業藍，去客戶化（與任何機構無關）
   品牌色：#2563eb（亮藍）
   ============================================================ */

/* ---------- 設計變數（亮色） ---------- */
:root {
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --on-accent: #ffffff;

  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-alt: #f1f3f6;
  --text: #1a1d23;
  --muted: #6b7280;
  --border: #e5e7eb;

  --success: #15803d;
  --danger: #dc2626;

  --radius-card: 16px;
  --radius: 10px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 8px 28px rgba(16, 24, 40, 0.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
}

/* ---------- 設計變數（暗色） ---------- */
html.dark {
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --on-accent: #ffffff;

  --bg: #0f1115;
  --surface: #1a1d23;
  --surface-alt: #23272f;
  --text: #e8e8ea;
  --muted: #9ca3af;
  --border: #2a2d35;

  --success: #4ade80;
  --danger: #f87171;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

/* ---------- 基礎 ---------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- 頂欄 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .wordmark {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}

.icon-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- 主內容 ---------- */
.wrap {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.card-head {
  text-align: center;
  margin-bottom: 24px;
}

.card-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 表單 / 密碼 ---------- */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-wrap .toggle-eye {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
}

.input-wrap .toggle-eye:hover {
  color: var(--text);
  background: var(--surface-alt);
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface-alt);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--border);
}

/* ---------- 拖曳上傳區 ---------- */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
  padding: 36px 20px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone .dz-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
}

.dropzone .dz-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.dropzone .dz-hint {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 進度 ---------- */
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.file-row .f-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.file-row .f-meta {
  flex: 1;
  min-width: 0;
}

.file-row .f-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row .f-size {
  font-size: 12px;
  color: var(--muted);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress .bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ---------- 完成 / 提示 ---------- */
.done {
  text-align: center;
  padding: 12px 0;
}

.done .done-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
}

.done h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.done p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.alert {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert.show {
  display: flex;
}

.alert-error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

/* ---------- 頁腳 ---------- */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 12px;
}

.footer .dot {
  margin: 0 6px;
  opacity: 0.5;
}

/* ---------- 工具 ---------- */
.hidden {
  display: none !important;
}

/* ---------- 響應式 ---------- */
@media (max-width: 480px) {
  .card {
    padding: 24px 18px;
  }
  .topbar {
    padding: 14px 16px;
  }
}
