:root {
  --nav: #071d35;
  --nav-soft: #0d2b4a;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --text: #172033;
  --muted: #667085;
  --subtle: #98a2b3;
  --page: #f5f7fa;
  --surface: #ffffff;
  --line: #e4e7ec;
  --success: #16a34a;
  --success-soft: #e9f8ee;
  --warning: #d97706;
  --warning-soft: #fff7e6;
  --danger: #dc2626;
  --danger-soft: #fff1f2;
  --coupon: #d99a31;
  --radius-sm: 8px;
  --radius: 12px;
  --shadow-float: 0 18px 50px rgba(23, 32, 51, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--page); color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[v-cloak] { display: none; }
a { color: inherit; }
button, input, select { font: inherit; }
button { min-height: 40px; cursor: pointer; border: none; border-radius: var(--radius-sm); }
input, select {
  min-height: 40px; border: 1px solid #d0d5dd; border-radius: var(--radius-sm);
  padding: 9px 12px; outline: none; background: #fff; color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease;
}
input::placeholder { color: var(--subtle); }
input:hover, select:hover { border-color: #98a2b3; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px;
}

.btn, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn { background: var(--primary); color: #fff; }
.btn:hover { background: var(--primary-hover); }
.btn:active, .btn-ghost:active, .btn-danger:active { transform: translateY(1px); }
.btn:disabled, .btn-ghost:disabled, .btn-danger:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid #b9ccfb; }
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #f3a6ad; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 13px; }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 12px; line-height: 18px; white-space: nowrap; font-weight: 600; }
.tag-unassigned { background: #f2f4f7; color: var(--muted); }
.tag-unshared { background: var(--warning-soft); color: var(--warning); }
.tag-shared { background: var(--primary-soft); color: var(--primary); }
.tag-used, .tag-active { background: var(--success-soft); color: var(--success); }
.tag-expired, .tag-inactive { background: #f2f4f7; color: var(--muted); }
.tag-void { background: var(--danger-soft); color: var(--danger); }

.brand-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.01em; }
.brand-badge { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff4dc; color: var(--coupon); font-weight: 800; font-size: 12px; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.field-label { display: block; color: #344054; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.empty-state { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty-state strong { display: block; color: #344054; font-size: 14px; margin-bottom: 4px; }
.empty-state span { font-size: 13px; }

.modal-mask { position: fixed; inset: 0; background: rgba(7, 29, 53, .52); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-float); }
.modal h3 { font-size: 18px; margin-bottom: 18px; }
.modal .row { margin-bottom: 14px; }
.modal label { display: block; font-size: 13px; color: #344054; font-weight: 600; margin-bottom: 6px; }
.modal input, .modal select { width: 100%; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 200; box-shadow: var(--shadow-float); max-width: min(90vw, 480px); }
.toast.err { background: var(--danger); }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px;
  background: var(--page);
}
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; width: 100%; max-width: 400px; box-shadow: var(--shadow-float); }
.login-brand { display: flex; justify-content: center; margin-bottom: 20px; }
.login-card h1 { font-size: 24px; text-align: center; margin-bottom: 6px; letter-spacing: -.02em; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.login-card .row { margin-bottom: 16px; }
.login-card input { width: 100%; min-height: 46px; }
.login-card .btn { width: 100%; min-height: 46px; font-size: 15px; margin-top: 4px; }
.login-card .hint { margin-top: 18px; padding: 10px 12px; border-radius: 8px; background: #f8fafc; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.7; }

@media (max-width: 600px) {
  button { min-height: 44px; }
  .btn, .btn-ghost, .btn-danger { min-height: 44px; }
  .login-wrap { align-items: flex-start; padding-top: 12vh; }
  .login-card { padding: 28px 22px; border-radius: 14px; }
}
