*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --accent: #0f67ff;
    --accent-dark: #0052d6;
    --text: #111;
    --muted: #6b7280;
    --bg: #f3f4f6;
    --surface: #fff;
    --border: #e0e0e0;
    --radius: 8px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 48px 16px 32px;
}

h1 {
    margin: 0 0 24px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-align: center;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
}

/* Fields */

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

.field input[type=text],
.field input[type=password],
.field select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
}

.input-row {
    position: relative;
}

.input-row input {
    padding-right: 44px;
}

.icon-btn {
    position: absolute;
    inset: 0 0 0 auto;
    width: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: color .15s;
}

.icon-btn:hover { color: var(--text); }

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.eye-slash { display: none; }

/* Advanced section */

.advanced {
    margin-bottom: 18px;
}

.advanced summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.advanced summary::-webkit-details-marker { display: none; }

.advanced summary::before {
    content: '+';
    font-size: 1rem;
    line-height: 1;
}

.advanced[open] summary::before {
    content: '−';
}

.advanced-body {
    padding-top: 14px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px 0;
}

.toggle-label input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

/* QR result */

.qr-result {
    text-align: center;
    padding-top: 24px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

#qrcode {
    display: inline-block;
    line-height: 0;
}

#qrcode img,
#qrcode canvas {
    border-radius: 4px;
}

.network-name {
    margin: 12px 0 18px;
    font-size: 1.1rem;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.actions button {
    height: 38px;
    padding: 0 18px;
    background: none;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.actions button:hover {
    background: var(--accent);
    color: #fff;
}

.privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.privacy svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    font-size: 0.75rem;
    color: var(--muted);
}

.footer a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}

.footer a:hover {
    color: var(--text);
}

.footer svg {
    width: 14px;
    height: 14px;
}

.print-sheet { display: none; }

