:root {
    --bg: #f3f5f9;
    --card: #ffffff;
    --text: #172033;
    --muted: #5b6678;
    --line: #d9e0ea;
    --accent: #2563eb;
    --accent-text: #ffffff;
    --ok-bg: #e8f6ee;
    --ok-line: #9bd4b1;
    --err-bg: #fdecec;
    --err-line: #f0a6a6;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1120;
        --card: #121a2e;
        --text: #e8edf7;
        --muted: #9aa6bb;
        --line: #26324a;
        --accent: #4b8bff;
        --accent-text: #0b1120;
        --ok-bg: #12301f;
        --ok-line: #2f7a4d;
        --err-bg: #3a1717;
        --err-line: #8a3a3a;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.card {
    width: min(460px, 100%);
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .08);
}

h1 { margin: 0 0 14px; font-size: 1.35rem; line-height: 1.25; }
h2 { margin: 22px 0 8px; font-size: 1.05rem; }
p  { margin: 0 0 12px; }

label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .95rem; }

input {
    width: 100%;
    padding: 11px 12px;
    font: inherit;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 9px;
}
input[type="hidden"] { display: none; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button, .button {
    display: inline-block;
    margin-top: 18px;
    padding: 11px 18px;
    font: inherit;
    font-weight: 700;
    color: var(--accent-text);
    background: var(--accent);
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.08); }

.pwrow { display: flex; gap: 8px; }
.pwrow input { flex: 1; min-width: 0; }
.toggle {
    margin: 0;
    padding: 0 12px;
    font-weight: 600;
    font-size: .85rem;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
}

.muted { color: var(--muted); }
.hint  { margin-top: 8px; color: var(--muted); font-size: .9rem; }

.notice { margin: 0 0 16px; padding: 12px 14px; border: 1px solid; border-radius: 9px; }
.notice p:last-child { margin-bottom: 0; }
.notice.ok  { background: var(--ok-bg);  border-color: var(--ok-line); }
.notice.err { background: var(--err-bg); border-color: var(--err-line); }

.settings { width: 100%; border-collapse: collapse; font-size: .92rem; }
.settings th, .settings td { padding: 7px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.settings th { width: 42%; padding-right: 10px; color: var(--muted); font-weight: 600; }

/* zamka za botove: van ekrana, ali nije display:none */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

a { color: var(--accent); }
