:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #17151f; background: #f5f4f9; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.history-card { margin-top: 22px; }
.history-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.history-head h2 { margin: 0; }
.history-actions { display: flex; gap: 8px; }
.export { color: #fff; background: #6547d7; }
.dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.metric { padding: 18px; box-shadow: none; }
.metric span, .metric small { display: block; color: #77717f; font-size: 12px; }
.metric strong { display: block; margin: 8px 0 2px; color: #30236f; font-size: 30px; }
.filters { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 18px; padding: 14px; border-radius: 16px; background: #f7f5fb; }
.filters label { margin: 0; color: #655f6c; }
.filters select, .filters input { display: block; width: 100%; min-height: 42px; margin-top: 6px; padding: 8px 10px; border: 1px solid #dcd8e4; border-radius: 10px; background: #fff; font: inherit; }
.compact { min-height: 42px; }
.history-list { display: grid; gap: 9px; margin-top: 14px; }
.history-list article { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #e7e3ee; border-radius: 12px; }
.history-list strong, .history-list small { display: block; }
.history-list small, .history-list time { margin-top: 3px; color: #7b7583; font-size: 11px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #8873e7, transparent 32%), #241859; }
.card { border: 1px solid #e3e0e9; border-radius: 24px; background: #fff; box-shadow: 0 18px 55px #2c225112; }
.login-card { width: min(440px, 100%); padding: 34px; }
.logo { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 19px; color: #fff; background: #6547d7; font-size: 29px; font-weight: 900; }
.logo.small { width: 42px; height: 42px; border-radius: 14px; font-size: 21px; }
.eyebrow { margin: 22px 0 7px; color: #6547d7; font-size: 12px; font-weight: 900; letter-spacing: 1.2px; }
h1 { margin: 0; font-size: clamp(30px, 6vw, 46px); letter-spacing: -1.5px; }
.lead { color: #77717f; line-height: 1.6; }
label { display: block; margin: 15px 0 7px; font-size: 13px; font-weight: 800; }
input { width: 100%; padding: 15px; border: 1px solid #dcd8e4; border-radius: 13px; background: #f8f7fa; outline: none; }
input:focus { border-color: #6547d7; box-shadow: 0 0 0 3px #6547d71a; }
.button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 13px; font-weight: 900; }
.button:disabled { cursor: wait; opacity: .55; }
.primary { width: 100%; color: #fff; background: #6547d7; }
.ghost { color: #56515f; background: #f0eef4; }
.success { width: 100%; color: #fff; background: #18794e; }
.login-card .primary, .form-card .primary { margin-top: 20px; }
.error, .message { min-height: 22px; color: #ad3f3a; font-size: 13px; }
header { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 4vw; border-bottom: 1px solid #e2dfe8; background: #fff; }
.brand, .account { display: flex; align-items: center; gap: 12px; }
.brand span { display: block; color: #88828f; font-size: 11px; }
.account > span { color: #716b78; font-size: 13px; }
.page { width: min(960px, calc(100% - 28px)); margin: 38px auto; }
.page > .eyebrow { margin-top: 0; }
.form-card, .result-card { margin-top: 24px; padding: 24px; }
.result-card h2 { margin: 17px 0; text-align: center; }
.status-banner { padding: 12px; border-radius: 13px; text-align: center; font-weight: 900; }
.status-banner.ready { color: #18794e; background: #e7f8ef; }
.status-banner.used, .status-banner.expired, .status-banner.cancelled { color: #a13d37; background: #fff0ef; }
dl { margin: 0 0 22px; }
dl div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #ece9f0; }
dt { color: #77717f; }
dd { margin: 0; font-weight: 800; text-align: right; }
.warning { color: #8a5b00; font-size: 12px; text-align: center; }
.success-mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 4px auto; border-radius: 50%; color: #fff; background: #18794e; font-size: 38px; font-weight: 900; }
.result-card > p { text-align: center; }
@media (max-width: 560px) {
  .account > span { display: none; }
  .page { margin-top: 26px; }
  .form-card, .result-card { padding: 19px; }
  dl div { flex-direction: column; gap: 4px; }
  dd { text-align: left; }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
  .history-head { align-items: flex-start; flex-direction: column; }
  .history-actions { width: 100%; }
  .history-actions .button { flex: 1; }
  .filters { grid-template-columns: 1fr; }
  .history-list article { grid-template-columns: 82px 1fr; }
  .history-list time { grid-column: 2; }
}
