/* cashcode.digital — minimal dark theme */

:root {
  --bg: #090627;
  --surface: #1c1c4c;
  --surface-2: #342f65;
  --border: #342f65;
  --ink: #ffffff;
  --ink-dim: #b3b2cf;
  --accent: #08e638;
  --accent-2: #04932d;
  --accent-ink: #090627;
  --error: #ef4343;
  --notice: #08e638;
  --radius: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}
a:hover { border-bottom-color: var(--accent); }

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

p { margin: 0 0 16px; color: var(--ink-dim); }
p:last-child { margin-bottom: 0; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

/* Forms */

form { margin: 0; }

label {
  display: block;
  margin-bottom: 16px;
  color: var(--ink-dim);
  font-size: 0.85rem;
}

label small {
  display: block;
  margin-top: 4px;
  color: var(--ink-dim);
  font-size: 0.75rem;
  opacity: 0.7;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  transition: border-color 120ms ease, background 120ms ease;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

button {
  display: inline-block;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 120ms ease;
}
button:hover { opacity: 0.9; }

button.secondary {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--border);
}
button.secondary:hover { color: var(--ink); border-color: var(--ink-dim); }

/* Landing */

.brand {
  margin-bottom: 48px;
}

.brand h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.brand h1 .accent {
  color: var(--accent);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.button {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0;
}
.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
}
.button.primary:hover { opacity: 0.9; border-bottom: none; }

.small {
  color: var(--ink-dim);
  font-size: 0.9rem;
  margin: 0;
}

/* Profile */

.profile {
  text-align: center;
  margin-bottom: 32px;
}

.profile h1 {
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.handle {
  color: var(--ink-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  margin: 0;
}

.handle a {
  margin-left: 4px;
  color: var(--accent);
}

.amount-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.amount-display {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink);
}

.amount-display .currency {
  color: var(--ink-dim);
  margin-right: 6px;
  font-weight: 500;
}

.inputs {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  text-align: left;
}

#qr {
  display: flex;
  justify-content: center;
  margin: 0 0 16px;
}

#qr svg {
  width: 220px;
  height: 220px;
  background: white;
  border-radius: 8px;
  padding: 12px;
}

.hint {
  color: var(--ink-dim);
  font-size: 0.8rem;
  margin: 0 0 16px;
}

.iban-details {
  margin: 16px 0 0;
  text-align: left;
}

.iban-details summary {
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 0.85rem;
  list-style: none;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.iban-details summary::-webkit-details-marker { display: none; }
.iban-details summary::before { content: "+ "; color: var(--ink-dim); }
.iban-details[open] summary::before { content: "− "; }

.iban-details code {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  word-break: break-all;
}

.share {
  color: var(--ink-dim);
  font-size: 0.8rem;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  word-break: break-all;
}

.share code {
  color: var(--accent);
}

/* Messages */

.error, .notice {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.error  { background: rgba(248,113,113,0.08); color: var(--error); border: 1px solid rgba(248,113,113,0.25); }
.notice { background: rgba(52,211,153,0.08); color: var(--notice); border: 1px solid rgba(52,211,153,0.25); }

/* Edit page */

.logout {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Site footer */

.site-footer {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ink-dim);
  font-size: 0.85rem;
}

.site-footer a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* FAQ */

.faq article {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.faq article:last-child { border-bottom: 1px solid var(--border); }

.faq h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

.faq p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.faq code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.85em;
}

/* Fieldset */

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  background: var(--surface);
}
fieldset legend {
  color: var(--ink-dim);
  padding: 0 8px;
  font-size: 0.85rem;
}
