/* Login page and "My account" (inc/account.php, inc/account-views.php). Loaded on those two pages only.
   Same language as the rest of the site: Inter Tight, uppercase 600 headings, hairlines, no accent colour (one small green for "ok"). */

:root { --acct-ok: #1F7A4D; --acct-ok-bg: rgba(31, 122, 77, 0.10); }

.btn.btn-sm { padding: 10px 16px; font-size: 0.74rem; }
.acct-cancel, .acct-logout { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.acct .btn:focus-visible, .acct-login .btn:focus-visible, .acct a:focus-visible, .acct button:focus-visible, .acct input:focus-visible, .acct select:focus-visible,
.acct-login a:focus-visible, .acct-login input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Login ---------- */
.acct-login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; padding-top: var(--header-h); }
.acct-login-photo { background-size: cover; background-position: center; background-color: #333336; color: var(--white); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 40px; min-height: 320px; }
.acct-login-photo h1 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.02; text-wrap: balance; }
.acct-login-photo p { margin: 0; max-width: 40ch; opacity: 0.88; }
.acct-login-form { padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 20px; width: 100%; max-width: 540px; margin: 0 auto; }
.acct-login-form h2 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; }
.acct-lead { margin: -8px 0 0; color: var(--ink-soft); }
.acct-foot { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.acct-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; }
.acct-row a { color: var(--ink-soft); }
.acct-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.acct-check input { accent-color: var(--ink); width: 16px; height: 16px; }
.acct-msg { margin: 0; font-size: 0.88rem; padding: 10px 14px; border: 1px solid var(--ink); background: var(--white); }
.acct-msg[hidden] { display: none; }

/* ---------- Fields ---------- */
.acct-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acct-f > span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 500; }
.acct-f input, .acct-f select { font: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 1px solid var(--line); padding: 13px 14px; border-radius: 0; width: 100%; min-width: 0; }
.acct-f input:focus, .acct-f select:focus { border-color: var(--ink); }
.acct-sec:not(.is-editing) .acct-f input, .acct-sec:not(.is-editing) .acct-f select { background: transparent; border-color: transparent; padding-left: 0; font-weight: 500; pointer-events: none; opacity: 1; -webkit-appearance: none; appearance: none; }
.acct-sec:not(.is-editing) .acct-f input::placeholder { color: var(--ink-soft); font-weight: 400; }
.acct-sec:not(.is-editing) .acct-f select:disabled { color: var(--ink); -webkit-text-fill-color: var(--ink); }

/* ---------- My account ---------- */
.acct { max-width: 1180px; margin: 0 auto; padding: calc(var(--header-h) + 36px) 32px 80px; }
.acct-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.acct-kicker { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.acct-title { margin: 6px 0 12px; font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 600; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.98; }
.acct-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-tag { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 10px; border: 1px solid var(--ink); display: inline-block; }
.acct-tag.is-solid { background: var(--ink); color: var(--white); }
.acct-tag.is-ok { border-color: transparent; background: var(--acct-ok-bg); color: var(--acct-ok); }
.acct-appstrip { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: var(--ink); color: var(--white); padding: 20px 26px; margin-top: 22px; }
.acct-appstrip p { margin: 0; font-size: 0.92rem; opacity: 0.88; }
.acct-appstrip strong { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; margin-right: 4px; opacity: 1; }
.acct-appstrip .btn { background: var(--white); color: var(--ink); border: 1px solid var(--white); }
.acct-nav { display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 0; margin-top: 8px; border-bottom: 1px solid var(--line); }
.acct-nav a { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 9px 14px 9px 0; margin-right: 14px; color: var(--ink-soft); text-decoration: none; }
.acct-nav a:hover { color: var(--ink); }
.acct-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; margin-top: 26px; }
.acct-card { background: var(--white); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; scroll-margin-top: calc(var(--header-h) + 12px); }
.acct-card.is-7 { grid-column: span 7; } .acct-card.is-5 { grid-column: span 5; } .acct-card.is-12 { grid-column: span 12; }
.acct-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acct-card h4 { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.acct-hint { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.acct-hint[hidden], .acct-saved[hidden] { display: none; }
.acct-link { background: none; border: none; font: inherit; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; cursor: pointer; padding: 0 0 2px; border-bottom: 1px solid var(--ink); color: var(--ink); text-decoration: none; }
.acct-saved { font-size: 0.8rem; color: var(--acct-ok); }

/* profile */
.acct-complete { display: flex; align-items: center; gap: 14px; font-size: 0.85rem; }
.acct-bar { flex: 1; height: 4px; background: var(--line); position: relative; }
.acct-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); display: block; }
.acct-sec { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.acct-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acct-sec-head h5 { margin: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--ink-soft); }
.acct-actions { display: none; gap: 10px; }
.acct-sec.is-editing .acct-actions { display: flex; }
.acct-sec.is-editing .acct-edit { display: none; }
.acct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.acct-fields .is-full { grid-column: 1 / -1; }

/* miles */
.acct-miles { font-size: clamp(3rem, 6vw, 4.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.acct-miles small { font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; margin-left: 8px; }
.acct-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acct-hist li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.92rem; align-items: baseline; }
.acct-hist .d { color: var(--ink-soft); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.acct-hist .p { font-weight: 600; font-variant-numeric: tabular-nums; }
.acct-hist .p.is-neg { color: var(--ink-soft); }

/* vouchers */
.acct-vouchers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.acct-voucher { border: 1px dashed var(--ink); padding: 18px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); min-width: 0; }
.acct-voucher .big { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.acct-voucher .what { font-size: 0.9rem; }
.acct-voucher .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; letter-spacing: 0.06em; color: var(--ink-soft); }
.acct-voucher .until { font-size: 0.78rem; color: var(--ink-soft); }
.acct-voucher .acct-tag { align-self: flex-start; margin-top: 6px; }
.acct-voucher.is-used { border-style: solid; border-color: var(--line); opacity: 0.6; }
.acct-voucher.is-used .big, .acct-voucher.is-used .what { text-decoration: line-through; }

/* orders */
.acct-orders { display: flex; flex-direction: column; }
.acct-order { display: grid; grid-template-columns: 72px minmax(280px, 1.6fr) max-content max-content auto; gap: 16px 32px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.acct-order:first-child { border-top: none; padding-top: 0; }
.acct-thumb { width: 72px; height: 72px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); overflow: hidden; }
.acct-thumb img { width: 100%; height: 100%; object-fit: cover; }
.acct-order .o-main strong { display: block; font-weight: 600; }
.acct-order .o-main span, .acct-order .o-col span { font-size: 0.82rem; color: var(--ink-soft); display: block; }
.acct-order .o-col b { font-weight: 600; font-variant-numeric: tabular-nums; display: block; }
.acct-order .o-ship b { white-space: nowrap; }
.acct-order .o-total { text-align: right; }
.acct-order .o-total b { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.acct-order .o-total .o-voucher { color: var(--acct-ok); }
.acct-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.acct-steps li { display: grid; gap: 5px; min-width: 0; }
.acct-steps i { height: 3px; background: var(--line); display: block; }
.acct-steps li.on i { background: var(--ink); }
.acct-order .o-main .acct-steps li span { font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-order .o-main .acct-steps li.on span { opacity: 1; }
.acct-order .o-main .acct-steps li.now span { color: var(--ink); font-weight: 700; opacity: 1; }
.acct-order .o-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acct-status { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 10px; border: 1px solid var(--ink); display: inline-block; }
.acct-order .acct-status { border-color: var(--line); color: var(--ink-soft); background: transparent; opacity: 0.75; white-space: nowrap; }
.acct-order .acct-status.is-done { border-color: var(--ink); background: var(--ink); color: var(--white); opacity: 1; }

@media (max-width: 900px) {
	.acct-login { grid-template-columns: 1fr; min-height: 0; }
	.acct-login-photo { min-height: 220px; padding: 28px 24px; }
	.acct-login-form { padding: 32px 24px 56px; }
	.acct { padding-left: 16px; padding-right: 16px; }
	.acct-head { grid-template-columns: 1fr; }
	.acct-card.is-7, .acct-card.is-5 { grid-column: span 12; }
	.acct-vouchers { grid-template-columns: 1fr; }
	.acct-order { grid-template-columns: 56px minmax(0, 1fr); }
	.acct-order .o-act { grid-column: 1 / -1; }
	.acct-order .o-col { display: none; }
	.acct-thumb { width: 56px; height: 56px; }
	.acct-fields { grid-template-columns: 1fr; }
	/* on a phone the way back to the app comes first, as a full-width button */
	.acct { display: flex; flex-direction: column; }
	.acct-appstrip { order: -1; margin: 0 0 20px; flex-direction: column; align-items: stretch; }
	.acct-appstrip .btn { text-align: center; padding: 18px 26px; }
}
@media (max-width: 480px) { .acct-card { padding: 20px; } }
.acct-pending { margin: 0; }
