/* Artisan Studio — Account page (Phase 11.10).
 * Dark/gold palette mirrors App/Core/Design/DesignTokens.swift (ASColor.*). */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* CRITICAL — must override the explicit `display: flex` set on view classes
 * below. Without this, the HTML `hidden` attribute (which sets
 * `display: none` in the UA stylesheet) is overruled, so authView +
 * accountView + the Qpay overlay all stack on top of each other on load.
 */
[hidden] { display: none !important; }

:root {
	--bg:        #000000;
	--surface:   #141620;
	--surface2:  #282A3A;
	--surface3:  #34364A;
	--text:      #F6F2EA;
	--text2:     rgba(246, 242, 234, 0.70);
	--text3:     rgba(246, 242, 234, 0.45);
	--gold:      #C69749;
	--gold-soft: #F1C779;
	--bronze:    #735F32;
	--line:      rgba(198, 151, 73, 0.13);
	--line-strong: rgba(198, 151, 73, 0.24);
	--danger:    #c8514c;
	--success:   #62a07a;
	--card-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

html, body { height: 100%; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	color: var(--text);
	background: var(--bg);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* Subtle warm vignette — matches landing/index.html. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 60% at 50% 0%, rgba(115, 95, 50, 0.18), transparent 60%),
		radial-gradient(ellipse 60% 50% at 50% 100%, rgba(20, 22, 32, 0.4), transparent 70%);
	pointer-events: none;
	z-index: 0;
}

.container {
	position: relative;
	z-index: 1;
	max-width: 880px;
	margin: 0 auto;
	padding: 0 24px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

a { color: inherit; }
.link-muted {
	color: var(--text3);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 13px;
	text-decoration: none;
	transition: color 120ms;
}
.link-muted:hover { color: var(--gold); }

/* Top bar */
.topbar {
	padding: 32px 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--line);
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}
.brand-mark-svg {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}
.logo-text {
	font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-weight: 600;
	font-size: 19px;
	letter-spacing: 0.01em;
	color: var(--text);
}

/* Auth view */
.auth-view {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 0;
}
.auth-card {
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: 20px;
	padding: 48px 40px;
	box-shadow: var(--card-shadow);
	max-width: 460px;
	width: 100%;
	text-align: center;
}
.auth-card h1 {
	font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-weight: 600;
	font-size: 28px;
	margin-bottom: 12px;
	letter-spacing: -0.005em;
	color: var(--text);
}
.lead { color: var(--text2); margin-bottom: 32px; line-height: 1.55; font-size: 15px; }
.signin-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
}
.signin-buttons > div { display: flex; justify-content: center; }
.trial-note {
	color: var(--text3);
	font-size: 12px;
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
}
.trial-note strong { color: var(--gold-soft); font-weight: 600; }
.auth-error {
	color: var(--danger);
	font-size: 13px;
	min-height: 18px;
	margin-top: 8px;
}

.auth-pending {
	background: rgba(40, 42, 58, 0.5);
	border: 1px dashed var(--line-strong);
	border-radius: 14px;
	padding: 20px;
	text-align: center;
}
.auth-pending p { color: var(--text2); font-size: 13px; }
.auth-pending p.auth-pending-sub {
	font-size: 11px;
	margin-top: 8px;
	color: var(--text3);
}

/* Account dashboard */
.account-view {
	flex: 1;
	padding: 32px 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 24px;
	box-shadow: var(--card-shadow);
}
.card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
.card-header h2 {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--gold-soft);
}
.card-icon { font-size: 18px; }
.card-sub { color: var(--text2); font-size: 13px; margin-bottom: 16px; }

/* Identity */
.identity-row {
	display: flex;
	align-items: center;
	gap: 16px;
}
.avatar {
	width: 56px; height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--gold), var(--bronze));
	color: var(--bg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 700;
}
.identity-text { flex: 1; }
.identity-text h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.identity-text .email { color: var(--text2); font-size: 13px; margin-bottom: 8px; }
.oauth-tags { display: flex; gap: 6px; }
.oauth-tag {
	display: inline-block;
	background: rgba(198, 151, 73, 0.12);
	color: var(--gold-soft);
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 100px;
	letter-spacing: 0.04em;
}

/* Wallet */
.wallet-balance {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
}
.big-number {
	font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: 40px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--gold-soft);
}
.big-label { color: var(--text2); font-size: 15px; }
.wallet-sub { color: var(--text3); font-size: 12px; margin-bottom: 16px; }
.wallet-stats {
	display: flex;
	gap: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--text3);
}
.stat-label { color: var(--text3); }
.wallet-stats span { color: var(--text); font-weight: 500; }

/* Plans + Packs grids */
.plans-grid, .packs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}
.plan-tile, .pack-tile {
	background: var(--surface2);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 20px;
	text-align: left;
	cursor: pointer;
	color: var(--text);
	transition: transform 80ms, border-color 80ms, background 80ms;
}
.plan-tile:hover, .pack-tile:hover {
	transform: translateY(-2px);
	border-color: var(--gold);
	background: var(--surface3);
}
.tile-name { font-weight: 600; margin-bottom: 6px; color: var(--text); font-size: 14px; }
.tile-price {
	font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: 24px;
	font-weight: 700;
	color: var(--gold-soft);
}
.tile-detail { color: var(--text3); font-size: 12px; margin-top: 4px; }

/* Invoice overlay */
.overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
}
.invoice-modal {
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: 20px;
	padding: 32px;
	max-width: 420px;
	width: calc(100% - 32px);
	text-align: center;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	color: var(--text);
}
.close-btn {
	position: absolute;
	top: 16px; right: 16px;
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	color: var(--text3);
	transition: color 120ms;
}
.close-btn:hover { color: var(--text); }
.invoice-modal h2 { font-size: 20px; margin-bottom: 6px; color: var(--text); }
.invoice-sub { color: var(--text2); font-size: 13px; margin-bottom: 16px; }
.invoice-amount {
	font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: 30px;
	font-weight: 700;
	margin-bottom: 20px;
	color: var(--gold-soft);
}
.qr-image {
	width: 220px; height: 220px;
	margin: 0 auto 16px;
	border-radius: 14px;
	border: 1px solid var(--line-strong);
	background: var(--text); /* QR needs light surface for camera contrast */
	padding: 6px;
}
.invoice-instr { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.bank-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 8px;
	margin-bottom: 16px;
}
.bank-link {
	background: var(--surface2);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 8px;
	text-decoration: none;
	color: var(--text);
	font-size: 12px;
	font-weight: 500;
	transition: border-color 120ms;
}
.bank-link:hover { border-color: var(--gold); }
.invoice-status {
	color: var(--text2);
	font-size: 13px;
	font-weight: 500;
	margin-top: 8px;
}
.invoice-status.paid { color: var(--success); font-weight: 600; }

/* Footer */
.footer {
	padding: 28px 0;
	border-top: 1px solid var(--line);
	color: var(--text3);
	font-size: 12px;
	text-align: center;
	margin-top: auto;
}

@media (max-width: 540px) {
	.container { padding: 0 16px; }
	.topbar { padding: 24px 0 16px; }
	.auth-card { padding: 32px 24px; }
	.identity-row { flex-wrap: wrap; }
	.logo-text { font-size: 17px; }
}
