*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #EFF6FF; --panel: #FFFFFF; --panel2: #DBEAFE;
  --border: #BFDBFE; --text: #1E3A8A; --text-muted: #64748b;
  --brand: #1D4ED8; --brand-dark: #1E40AF; --brand-light: #EFF6FF;
  --radius: 10px; --shadow: 0 2px 8px rgba(29,78,216,.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: 1000px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--brand); }
.header-badges { display: flex; gap: 6px; }
.badge { background: var(--panel2); color: var(--brand); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }

/* MAIN */
.app-main { max-width: 1000px; margin: 0 auto; padding: 24px 20px; display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
@media (max-width: 760px) { .app-main { grid-template-columns: 1fr; } }

/* TYPE TABS */
.type-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ttab { padding: 8px 14px; border: 2px solid var(--border); border-radius: 8px; background: var(--panel); font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--text-muted); transition: all .15s; white-space: nowrap; }
.ttab.active { background: var(--brand); border-color: var(--brand); color: white; }
.ttab:hover:not(.active) { border-color: var(--brand); color: var(--brand); }

/* CARDS */
.input-card, .customize-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 14px; }

/* FORMS */
.content-form { display: none; }
.content-form.active { display: block; }
.field-group { margin-bottom: 14px; }
.field-group:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .field-row { grid-template-columns: 1fr; } }
.field-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.field-inp { width: 100%; padding: 10px 12px; border: 2px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--text); background: var(--bg); outline: none; transition: border .15s; font-family: inherit; resize: vertical; }
.field-inp:focus { border-color: var(--brand); background: white; }
.field-sel { width: 100%; padding: 9px 12px; border: 2px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--text); background: white; cursor: pointer; font-family: inherit; outline: none; }
.field-sel:focus { border-color: var(--brand); }
.check-label { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.check-label input { accent-color: var(--brand); width: 15px; height: 15px; }

/* CUSTOMIZE */
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 14px; }
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 400px) { .custom-grid { grid-template-columns: 1fr; } }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-pick { width: 40px; height: 36px; padding: 2px; border: 2px solid var(--border); border-radius: 6px; cursor: pointer; background: none; flex-shrink: 0; }
.hex-inp { flex: 1; padding: 8px 10px; border: 2px solid var(--border); border-radius: 6px; font-size: 13px; font-family: monospace; outline: none; }
.hex-inp:focus { border-color: var(--brand); }

/* COLOR PRESETS */
.color-presets { margin-top: 4px; }
.presets-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-preset { width: 36px; height: 36px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: transform .12s, border .12s; }
.color-preset:hover { transform: scale(1.1); }
.color-preset.active { border-color: var(--brand); }

/* QR OUTPUT */
.qr-card { background: var(--panel); border: 2px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center; margin-bottom: 14px; position: sticky; top: 16px; }
.qr-preview { min-height: 220px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.qr-preview canvas, .qr-preview img { border-radius: 6px; }
.qr-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.btn-download { padding: 12px; background: var(--brand); border: none; border-radius: 8px; color: white; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .12s; }
.btn-download:hover { background: var(--brand-dark); }
.btn-copy-link { padding: 10px; border: 2px solid var(--border); border-radius: 8px; background: none; color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .12s; }
.btn-copy-link:hover { border-color: var(--brand); color: var(--brand); }
.qr-info { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }

/* TIPS */
.tips-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.tips-list { padding-left: 16px; display: flex; flex-direction: column; gap: 8px; }
.tips-list li { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.tips-list strong { color: var(--text); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); text-align: center; padding: 14px; color: var(--text-muted); font-size: 12px; margin-top: 4px; }
