:root {
    --bg:        #1a1a1a;
    --bg-2:      #242424;
    --bg-3:      #2e2e2e;
    --fg:        #e8e8e8;
    --fg-dim:    #a0a0a0;
    --accent:    #ff7a45;
    --accent-fg: #1a1a1a;
    --danger:    #d34c4c;
    --ok:        #5fbd6f;
    --border:    #3a3a3a;
    --radius:    8px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.45;
    min-height: 100dvh;
}

header {
    padding: 1rem 1.25rem;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

h1 {
    margin: 0 0 .75rem;
    font-size: 1.25rem;
    color: var(--accent);
}

nav {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg-dim);
    padding: .4rem .9rem;
    border-radius: var(--radius);
    font-size: .9rem;
    cursor: pointer;
}

.tab.active {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
    font-weight: 600;
}

main {
    padding: 1rem 1.25rem;
    max-width: 720px;
    margin: 0 auto;
}

.view { display: none; }
.view.active { display: block; }

textarea, input[type=text], input[type=search] {
    width: 100%;
    background: var(--bg-2);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem;
    font: inherit;
}

textarea {
    resize: vertical;
    min-height: 8rem;
}

button {
    background: var(--accent);
    color: var(--accent-fg);
    border: none;
    border-radius: var(--radius);
    padding: .65rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: .75rem;
    font-size: .95rem;
}

button.secondary {
    background: var(--bg-3);
    color: var(--fg);
    border: 1px solid var(--border);
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.hint {
    color: var(--fg-dim);
    font-size: .85rem;
    margin-top: .75rem;
}

kbd {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0 .3rem;
    font-family: ui-monospace, monospace;
    font-size: .85em;
}

.status {
    margin-top: .75rem;
    font-size: .9rem;
    min-height: 1.2em;
}

.status.ok    { color: var(--ok); }
.status.error { color: var(--danger); }

.list-toolbar {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}

.list-toolbar input { flex: 1; }
.list-toolbar button { margin-top: 0; }

#notes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.note {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem .9rem;
}

.note-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.note-meta {
    display: flex;
    gap: .8rem;
    margin-top: .4rem;
    font-size: .8rem;
    color: var(--fg-dim);
}

.note-status {
    font-size: .7rem;
    padding: 0 .4rem;
    border-radius: 4px;
    background: var(--bg-3);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.note-status.raw     { color: var(--fg-dim); }
.note-status.enriched{ color: var(--ok); }

.empty {
    text-align: center;
    color: var(--fg-dim);
    padding: 2rem 0;
}

fieldset {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

fieldset legend {
    padding: 0 .5rem;
    font-weight: 600;
    color: var(--accent);
}

pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem;
    overflow-x: auto;
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.hidden { display: none !important; }
