body{font-family:system-ui,Segoe UI,Arial,sans-serif;margin:0;background:#f4f6f8;color:#1a1a1a}
header{background:#1f4e79;color:#fff;padding:14px 20px;display:flex;justify-content:space-between;align-items:center}
main{max-width:640px;margin:0 auto;padding:20px}
.card{background:#fff;border-radius:10px;padding:18px;margin-bottom:16px;box-shadow:0 1px 3px rgba(0,0,0,.12)}
label{display:block;font-weight:600;margin-bottom:6px}
input{width:100%;box-sizing:border-box;font-size:1.3rem;padding:12px;border:2px solid #9aa7b4;border-radius:8px}
button{font-size:1.2rem;padding:14px 20px;border:0;border-radius:8px;background:#1f4e79;color:#fff;cursor:pointer;margin:8px 8px 0 0}
button.alt{background:#5b6b7a}
button:disabled{opacity:.5}
.balance{font-size:2.4rem;font-weight:700;margin:6px 0}
.msg{padding:12px;border-radius:8px;margin:12px 0}
.msg.ok{background:#e3f4e6;color:#17491f}
.msg.err{background:#fde7e7;color:#7a1212}
.muted{color:#5b6b7a;font-size:.95rem}
table{width:100%;border-collapse:collapse}
td,th{padding:8px 6px;border-bottom:1px solid #e1e6ea;text-align:left}
td.num,th.num{text-align:right}
.hidden{display:none}

.test-terminal {
  min-height: 100vh;
  background: #f3f6fa;
  color: #172941;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.test-terminal * { box-sizing: border-box; }
.test-terminal .terminal-header {
  min-height: 88px;
  padding: 18px clamp(20px, 4vw, 48px);
  gap: 20px;
  background: #fff;
  color: #172941;
  border-bottom: 1px solid #dce5ef;
}
.terminal-brand { display: flex; flex-direction: column; flex-shrink: 0; gap: 2px; }
.terminal-brand strong { color: #174fa9; font-size: 1.65rem; letter-spacing: -.05em; line-height: 1; }
.terminal-brand span { color: #5b6d82; font-size: .79rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.terminal-context { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; text-align: right; }
.terminal-location { color: #172941; font-size: 1.05rem; overflow-wrap: anywhere; }
.terminal-account { display: flex; align-items: center; gap: 6px; min-width: 0; color: #53687f; font-size: .95rem; }
.terminal-account #operatorName { overflow-wrap: anywhere; }
.terminal-separator { color: #9aabbf; }
.test-terminal .terminal-signout {
  flex: none;
  min-width: 48px;
  min-height: 44px;
  margin: 0 -10px 0 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #174fa9;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.test-terminal .terminal-signout:hover { background: #eef4fc; }
.test-terminal .terminal-signout:focus-visible { outline: 3px solid #174fa9; outline-offset: 2px; }
.test-terminal .terminal-signout:disabled { color: #7d8da0; cursor: wait; }
.test-terminal .terminal-main { max-width: 1160px; padding: 32px clamp(20px, 4vw, 48px) 48px; }
.terminal-heading { margin-bottom: 24px; }
.terminal-heading h1, .login-card h1 { margin: 3px 0 0; font-size: clamp(1.7rem, 3vw, 2.15rem); letter-spacing: -.035em; }
.terminal-eyebrow { margin: 0; color: #536d8b; font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
.terminal-description { color: #53687f; font-size: 1rem; line-height: 1.5; }
.terminal-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.terminal-workspace.has-card { grid-template-columns: minmax(0, 1fr); align-items: start; }
.test-terminal .card { margin: 0; padding: clamp(22px, 3vw, 32px); border: 1px solid #dce5ef; border-radius: 16px; box-shadow: 0 6px 24px rgba(28, 54, 86, .05); }
.present-card { min-width: 0; text-align: center; }
.terminal-workspace:not(.has-card) .present-card { width: 100%; max-width: 640px; justify-self: center; padding: clamp(30px, 5vw, 56px); }
.present-card h2, .card-panel h2 { margin: 8px 0; font-size: 1.65rem; letter-spacing: -.025em; }
.card-symbol { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 24px; border-radius: 24px; background: #e8f1ff; }
.card-symbol span { width: 41px; height: 29px; border: 3px solid #2567c9; border-radius: 6px; position: relative; }
.card-symbol span::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; border-top: 3px solid #2567c9; }
.observation-label { margin-top: 26px; text-align: left; }
.test-terminal input { min-height: 56px; padding: 12px 15px; border: 1.5px solid #aebed0; border-radius: 9px; background: #fff; font: inherit; font-size: 1.1rem; }
.test-terminal .observation-input { color: transparent; caret-color: #174fa9; }
.test-terminal .observation-input::placeholder { color: #6a7d92; opacity: 1; }
.test-terminal button { min-height: 52px; margin: 0; padding: 12px 20px; border-radius: 9px; background: #185bbd; font: inherit; font-weight: 700; }
.test-terminal button:hover:not(:disabled) { background: #124a9c; }
.test-terminal button.alt { background: #eff5fc; color: #174b8d; border: 1px solid #c9daef; }
.test-terminal button.alt:hover:not(:disabled) { background: #dfeeff; }
.test-terminal button:disabled { cursor: not-allowed; }
.test-terminal button:focus-visible, .test-terminal input:focus-visible, .test-terminal summary:focus-visible { outline: 3px solid #e8a12c; outline-offset: 3px; }
.test-terminal .reader-button { width: 100%; margin-top: 12px; }
.reader-notice { margin: 20px 0 0; color: #64758a; font-size: .82rem; line-height: 1.45; }
.card-panel { min-width: 0; }
.card-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.test-terminal .next-card { flex-shrink: 0; font-size: .9rem; }
.card-status { margin: 4px 0 18px; }
.balance-panel { padding: 22px; background: #eef5ff; border: 1px solid #d7e7fc; border-radius: 12px; color: #3c5978; font-weight: 700; }
.test-terminal .balance { margin: 4px 0; color: #123f7a; font-size: clamp(2.5rem, 5vw, 3.5rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.balance-panel .muted { font-weight: 400; line-height: 1.4; }
.transaction-actions { margin-top: 24px; }
.test-prize-notice { padding: 12px 14px; border-left: 3px solid #be7b12; border-radius: 4px; background: #fff6e5; color: #694600; font-size: .88rem; line-height: 1.4; }
.amount-field { display: flex; align-items: center; border: 1.5px solid #aebed0; border-radius: 9px; background: #fff; }
.amount-field:focus-within { outline: 3px solid #e8a12c; outline-offset: 3px; }
.amount-field span { padding-left: 16px; color: #546a83; font-size: 1.4rem; font-weight: 700; }
.test-terminal .amount-field input { border: 0; outline: 0; font-size: 1.5rem; font-weight: 700; }
.amount-help { margin: 6px 0 14px; color: #61758b; font-size: .85rem; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.action-buttons button { flex: 1 1 180px; }
.test-terminal .msg { margin: 16px 0; padding: 14px 16px; border: 1px solid transparent; line-height: 1.45; }
.test-terminal .msg.err { border-color: #e8b3b0; background: #fff0ef; color: #812b28; }
.test-terminal .msg.ok { border-color: #aad7bd; background: #eaf8ef; color: #1d5e36; }
.test-terminal .msg.info { border-color: #bed4f3; background: #eef5ff; color: #174b8d; }
.pending-panel { margin-bottom: 20px !important; border-left: 4px solid #be7b12 !important; line-height: 1.5; }
.pending-panel > div { margin-top: 8px; }
.pending-panel button { margin-top: 16px !important; }
.activity { margin-top: 20px; border-top: 1px solid #dce5ef; }
.activity summary { min-height: 52px; padding: 16px 0; color: #23476e; font-weight: 700; cursor: pointer; }
.activity-table { overflow-x: auto; }
.activity table { min-width: 440px; font-size: .9rem; }
.login-main { display: grid; min-height: calc(100vh - 88px); place-items: start center; }
.test-terminal .login-card { width: min(100%, 480px); margin-top: clamp(24px, 8vh, 80px); }
.login-card label { margin-top: 18px; }
.login-card button { width: 100%; margin-top: 24px; }
@media (max-width: 700px) {
  .test-terminal .terminal-header { min-height: 72px; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .terminal-brand span { display: none; }
  .terminal-location { font-size: .95rem; }
  .terminal-account { font-size: .9rem; }
  .terminal-workspace.has-card { grid-template-columns: minmax(0, 1fr); }
  .test-terminal .terminal-main { padding-top: 24px; }
}
@media (max-width: 380px) {
  .card-panel-heading { align-items: flex-start; flex-direction: column; }
  .test-terminal .next-card { width: 100%; }
}
