/* path: public/assets/css/style.css */
:root {
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #3b82f6;
  --primary-600: #2563eb;
  --card: #f9fafb;
  --border: #e5e7eb;
  --danger: #dc2626;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --primary: #60a5fa;
  --primary-600: #3b82f6;
  --card: #0f172a;
  --border: #1f2937;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app { max-width: 1100px; margin: 0 auto; padding: 24px; }
.app__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.1)); }
.brand__title { font-size: 1.25rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.05); }
.card__title { margin: 0 0 12px; font-size: 1.1rem; }

.form { display: grid; gap: 12px; }
.form__row { display: grid; gap: 6px; }
.form__row--inline { grid-template-columns: 1fr 1fr; gap: 12px; }
label { font-weight: 600; }
.hint { color: var(--muted); font-size: .85rem; min-height: 18px; }

input, select, textarea { appearance: none; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: white; color: #111827; outline: none; }
[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{ background: #0b1220; color: var(--text); border-color: var(--border); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); }

.logo-row { display:flex; align-items: center; gap: 12px; }
.logo-row__label { font-weight:600; }
.logo-row__controls { display:flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.range { display:flex; align-items:center; gap:8px; }

/* Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input{ display:none; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .2s; border-radius: 999px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; top: 3px; background: white; transition: .2s; border-radius: 50%; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(20px); }

.actions { display: flex; gap: 8px; align-items: center; }
.actions--wrap { flex-wrap: wrap; }

.btn { background: var(--primary); color: white; border: none; border-radius: 12px; padding: 10px 16px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 16px rgba(59,130,246,.25); }
.btn:hover { background: var(--primary-600); }
.btn--ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); box-shadow: none; }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary-600); }

.error { color: var(--danger); min-height: 20px; }

.qr { display: grid; place-items: center; min-height: 320px; border: 1px dashed var(--border); border-radius: 12px; background: white; }
[data-theme="dark"] .qr { background: #0b1220; }
.qr__canvas img, .qr__canvas canvas, .qr__canvas svg { max-width: 100%; height: auto; border-radius: 12px; }
.qr__spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.code textarea { width: 100%; min-height: 100px; resize: vertical; }

.history { min-height: 120px; }
.history__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.history__item { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: white; }
[data-theme="dark"] .history__item { background: #0b1220; }
.history__thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.history__meta { flex: 1; display: grid; gap: 2px; font-size: .9rem; }
.history__meta small { color: var(--muted); }

.app__footer { margin-top: 16px; color: var(--muted); text-align: center; font-size: .9rem; }

.toast { position: fixed; bottom: 16px; right: 16px; background: #111827; color: white; padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .25s; z-index: 50; }
.toast--show { opacity: 1; transform: translateY(0); }

