/* Tilisivu: maksut, lahjakortit ja koodit */

.ac { max-width: 860px; }
.ac-tabs { display: flex; gap: 6px; margin-bottom: 30px; padding: 5px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); }
.ac-tabs a { flex: 1; padding: 10px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 600; text-align: center; transition: color .2s, background .2s; }
.ac-tabs a:hover { color: var(--text); }
.ac-tabs a.active { color: var(--cta-text); background: var(--cta); }

.ac-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.ac-head.center { justify-content: center; text-align: center; }
.ac-head h1 { margin: 0; font: 900 clamp(26px, 4vw, 34px)/1.15 Montserrat, var(--font); }
.ac-head p { margin: 4px 0 0; color: var(--text-2); }

.ac-empty { padding: 44px 20px; border: 1px dashed var(--line-2); border-radius: 14px; text-align: center; color: var(--text-2); }
.ac-empty strong { display: block; font-size: 18px; color: var(--text); }
.ac-empty p { margin: 6px 0 16px; }
.ac-empty .h-btn { display: inline-flex; }

.ac-pay { display: grid; grid-template-columns: 190px minmax(0, 1fr); margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); transition: border-color .2s, translate .25s var(--spring); }
.ac-pay:hover { translate: 0 -2px; border-color: var(--line-3); }
.ac-pay-img { aspect-ratio: 16 / 10; overflow: hidden; background: #0d0a08; }
.ac-pay-img > * { width: 100%; height: 100%; object-fit: cover; }
.ac-pay-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; min-width: 0; }
.ac-pay-body > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.ac-pay h3 { margin: 0; font-size: 18px; }
.ac-pay time { flex: none; color: var(--muted); font-size: 13px; }
.ac-pay-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-weight: 700; }
.ac-pay-foot b { padding: 4px 8px; border-radius: 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.ac-pay-foot b.ok { color: #4fc25a; background: rgba(79, 194, 90, .14); }
.ac-pay-foot b.bad { color: #ff7b6b; background: rgba(255, 123, 107, .14); }

.ac-txn { display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; transition: color .2s; }
.ac-txn:hover { color: var(--text); }
.ac-txn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.ac-txn code { font: 500 12.5px "JetBrains Mono", monospace; }

.ac-form { display: flex; max-width: 600px; margin: 0 auto 14px; }
.ac-form input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 10px; background: var(--card); color: var(--text); font: inherit; }
.ac-form input:focus { outline: none; border-color: var(--accent); }
.ac-form .h-btn { border-radius: 0 10px 10px 0; }

.ac-card { max-width: 600px; margin: 0 auto 26px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); animation: fadein .3s; }
.ac-card.blank { border-style: dashed; opacity: .7; }
.ac-card header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.ac-card header svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.ac-card header b { margin-left: auto; color: #ff7b6b; font-size: 12px; }
.ac-balance { padding: 26px 16px; text-align: center; }
.ac-balance small { display: block; color: var(--muted); }
.ac-balance strong { font: 900 42px Montserrat, var(--font); }
.ac-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0 16px; padding: 14px 0; border-top: 1px solid var(--line); text-align: center; }
.ac-card dt { color: var(--muted); font-size: 13px; }
.ac-card dd { margin: 2px 0 0; font-weight: 700; }

#acSaved { max-width: 600px; margin: 0 auto; }
.ac-saved-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.ac-saved-head small { color: var(--muted); }
.ac-saved-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ac-saved { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); color: var(--text); cursor: pointer; transition: border-color .2s; }
.ac-saved:hover { border-color: var(--accent); }
.ac-saved span { color: var(--muted); font-size: 12px; }
.ac-saved svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.ac-saved strong { font: 500 14px "JetBrains Mono", monospace; }

.ac-code { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 10px; padding: 14px; border: 1px solid var(--line-2); border-left: 3px solid var(--tier); border-radius: 12px; background: var(--card); }
.ac-code > div { flex: 1 1 180px; min-width: 0; }
.ac-code strong { display: block; }
.ac-code small { color: var(--muted); }
.ac-code .ac-txn { align-self: center; color: var(--text-2); }
.ac-code .h-btn { padding: 9px 14px; font-size: 13px; }

/* Tilivalikko navissa */
.acc { position: relative; }
#loginBtn.linked { padding: 4px 10px 4px 5px; gap: 8px; }
#loginBtn.linked > svg { width: 14px; height: 14px; transition: rotate .25s var(--spring); }
#loginBtn[aria-expanded="true"] > svg { rotate: 180deg; }
.acc-ava { display: grid; place-items: center; flex: none; width: 26px; height: 26px; overflow: hidden; border-radius: 50%; background: rgba(251, 139, 30, .2); color: var(--accent); font-size: 12px; font-weight: 800; }
.acc-ava img { width: 100%; height: 100%; object-fit: cover; }
.acc-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: 236px; padding: 8px; border: 1px solid var(--line-2); border-radius: 14px; background: #15110e; box-shadow: 0 22px 50px -14px #000; transform-origin: top right; animation: acc-in .24s var(--spring); }
.acc-menu[hidden] { display: none; }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.acc-menu a, .acc-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: 600 14.5px var(--font); text-align: left; cursor: pointer; transition: background .15s; }
.acc-menu a:hover, .acc-menu button:hover { background: rgba(255, 255, 255, .06); }
.acc-menu svg { flex: none; width: 18px; height: 18px; color: var(--text-2); fill: none; stroke: currentColor; stroke-width: 2; }
.acc-menu svg.fill { fill: currentColor; stroke: none; }
.acc-menu span { min-width: 0; }
.acc-menu small { display: block; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.acc-menu .acc-ext { width: 13px; height: 13px; margin-left: auto; }

@media (max-width: 640px) {
  .ac-pay { grid-template-columns: 1fr; }
  .ac-saved-list { grid-template-columns: 1fr; }
  .ac-tabs a { padding: 9px 4px; font-size: 13px; }
}
