:root {
    --bg: #0d0d1a;
    --surface: #1a1a2e;
    --border: #2d2d4e;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --success: #10b981;
    --error: #ef4444;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --r: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 24px 16px;
    font-size: 15px;
}

a { color: inherit; }

.container {
    max-width: 820px;
    margin: 0 auto;
}

/* ── Header ── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logout {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: all .2s;
}
.logout:hover { border-color: var(--accent); color: var(--text); }

/* ── Sections ── */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
    margin-bottom: 14px;
}
.section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: 16px;
}

/* ── Fields ── */
.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }

label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--r);
    padding: 8px 11px;
    font-size: 0.875rem;
    transition: border-color .2s;
    outline: none;
}
input:focus, select:focus { border-color: var(--accent); }

input[type="color"] {
    width: 100%;
    height: 38px;
    padding: 3px 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    outline: none;
}
input[type="color"]:focus { border-color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

/* ── UUID row ── */
.uuid-row { display: flex; gap: 8px; }
.uuid-row input { flex: 1; font-family: monospace; font-size: 0.8rem; }

/* ── Avatar tabs ── */
.avatar-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.avatar-tab {
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: none;
    color: var(--muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all .2s;
}
.avatar-tab.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(124,58,237,.1);
}

/* ── File drop ── */
.file-drop {
    border: 2px dashed var(--border);
    border-radius: var(--r);
    padding: 22px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
    position: relative;
}
.file-drop:hover, .file-drop.drag-over { border-color: var(--accent); }
.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.file-drop p { color: var(--muted); font-size: 0.8rem; }
.file-drop p strong { color: var(--text); }
.file-name { color: var(--accent); font-size: 0.8rem; margin-top: 6px; }

/* ── Toggle switches ── */
.toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 9px;
}
.toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: border-color .2s;
    user-select: none;
}
.toggle-item:hover { border-color: var(--accent); }
.toggle-item input[type="checkbox"] { display: none; }
.switch {
    width: 34px;
    height: 18px;
    background: var(--border);
    border-radius: 9px;
    position: relative;
    flex-shrink: 0;
    transition: background .2s;
}
.switch::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform .2s;
}
.toggle-item input:checked ~ .switch { background: var(--accent); }
.toggle-item input:checked ~ .switch::after { transform: translateX(16px); }
.toggle-item span.label { font-size: 0.8rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--r);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: 5px 11px; font-size: 0.78rem; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

/* ── Alerts ── */
.alert {
    padding: 10px 14px;
    border-radius: var(--r);
    font-size: 0.82rem;
    margin-bottom: 16px;
}
.alert-error  { background: rgba(239,68,68,.12);  border: 1px solid var(--error);   color: var(--error); }
.alert-success{ background: rgba(16,185,129,.12); border: 1px solid var(--success); color: var(--success); }

/* ── Login ── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 360px;
}
.login-box h1 {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.subtitle { text-align: center; color: var(--muted); font-size: 0.78rem; margin-bottom: 26px; }
.login-box .field { margin-bottom: 14px; }
.login-submit { width: 100%; justify-content: center; margin-top: 6px; }

/* ── Result ── */
.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px;
    text-align: center;
    margin-bottom: 18px;
}
.result-icon { font-size: 2.5rem; margin-bottom: 14px; }
.result-card h2 { font-size: 1.15rem; margin-bottom: 8px; }
.result-card p  { color: var(--muted); font-size: 0.85rem; margin-bottom: 22px; }
.wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000;
    color: white;
    padding: 12px 26px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform .2s, opacity .2s;
}
.wallet-btn:hover { transform: scale(1.03); opacity: .9; }
.url-copy {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    align-items: center;
    text-align: left;
}
.url-copy input {
    flex: 1;
    font-family: monospace;
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 7px 10px;
}
.back-row { text-align: center; }
