*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F0FDF4; --panel: #FFFFFF; --panel2: #DCFCE7;
  --border: #BBF7D0; --text: #064E3B; --text-muted: #64748b;
  --brand: #059669; --brand-dark: #047857; --brand-light: #D1FAE5;
  --red: #EF4444; --radius: 10px; --shadow: 0 2px 8px rgba(5,150,105,.1);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; min-height: 100vh; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* HEADER */
.site-header { background: var(--panel); border-bottom: 2px solid var(--brand); box-shadow: var(--shadow); }
.header-inner { max-width: 900px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--brand); }
.rate-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #334155; }
.status-dot.live { background: var(--brand); box-shadow: 0 0 6px var(--brand); }
.status-dot.err { background: var(--red); }

/* MAIN */
.app-main { max-width: 900px; margin: 0 auto; padding: 24px 20px; }

/* CONVERTER CARD */
.converter-card { background: var(--panel); border: 2px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 16px; }
.conv-row { display: grid; grid-template-columns: 1fr 52px 1fr; gap: 16px; align-items: end; margin-bottom: 16px; }
@media (max-width: 600px) { .conv-row { grid-template-columns: 1fr; } .swap-btn { justify-self: center; transform: rotate(90deg); } }
.conv-half { display: flex; flex-direction: column; gap: 8px; }
.conv-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.amount-inp { padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 28px; font-weight: 800; color: var(--text); background: var(--bg); outline: none; transition: border .15s; width: 100%; font-variant-numeric: tabular-nums; }
.amount-inp:focus { border-color: var(--brand); background: white; }
.amount-inp.result { background: var(--brand-light); color: var(--brand-dark); cursor: default; }
.currency-sel { padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 14px; font-weight: 600; color: var(--text); background: white; cursor: pointer; font-family: inherit; outline: none; width: 100%; }
.currency-sel:focus { border-color: var(--brand); }
.swap-btn { align-self: center; width: 48px; height: 48px; border: 2px solid var(--border); border-radius: 50%; background: white; font-size: 20px; cursor: pointer; color: var(--brand); transition: all .15s; display: flex; align-items: center; justify-content: center; }
.swap-btn:hover { background: var(--brand); color: white; border-color: var(--brand); }

.rate-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted); padding: 10px 14px; background: var(--panel2); border-radius: 8px; flex-wrap: wrap; gap: 8px; }
.rate-updated { font-size: 11px; }

/* QUICK AMOUNTS */
.quick-amounts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.qa-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.qa-btn { padding: 5px 12px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; color: var(--text-muted); transition: all .12s; }
.qa-btn:hover { background: var(--brand); border-color: var(--brand); color: white; }
.qa-btn.active { background: var(--brand); border-color: var(--brand); color: white; }

/* MULTI TABLE */
.multi-card { background: var(--panel); border: 2px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.multi-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 15px; font-weight: 700; }
.btn-icon-sm { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; background: none; color: var(--text-muted); font-size: 13px; cursor: pointer; font-family: inherit; transition: all .12s; }
.btn-icon-sm:hover { border-color: var(--brand); color: var(--brand); }

.loading-state { display: flex; align-items: center; gap: 12px; padding: 24px; color: var(--text-muted); font-size: 13px; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.multi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.mc-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer; transition: all .12s; }
.mc-item:hover { border-color: var(--brand); background: var(--brand-light); }
.mc-left { display: flex; flex-direction: column; }
.mc-flag { font-size: 18px; }
.mc-code { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.mc-name { font-size: 10px; color: var(--text-muted); }
.mc-val { font-size: 15px; font-weight: 800; color: var(--text); }

/* INFO */
.info-section { margin-bottom: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.info-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.info-card h3 { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.info-card p { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); text-align: center; padding: 14px; color: var(--text-muted); font-size: 12px; }
