:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --ink: #1c2024;
    --muted: #6b7280;
    --line: #e3e6ea;
    --accent: #2f6f4f;
    --accent-ink: #ffffff;
    --danger: #a32c1e;
    --ok-bg: #e8f3ec;
    --err-bg: #fbeae8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16181c;
        --panel: #1e2126;
        --ink: #e6e8ea;
        --muted: #9aa3ad;
        --line: #2c3037;
        --accent: #4f9d75;
        --accent-ink: #0d0f11;
        --danger: #e0705f;
        --ok-bg: #1d2b23;
        --err-bg: #2e1f1d;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 2rem 1rem 4rem;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 62rem; margin: 0 auto; }

h1 { font-size: 1.35rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0 0 1rem; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card.narrow { max-width: 26rem; margin: 3rem auto; }
.card.center { text-align: center; }
.card.created { border-color: var(--accent); }

label {
    display: block;
    margin: 1rem 0 0.35rem;
    font-weight: 600;
    font-size: 0.87rem;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

button, .button {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.55rem 1.1rem;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

button.link {
    margin: 0;
    padding: 0;
    background: none;
    color: var(--muted);
    font-weight: 500;
    text-decoration: underline;
}

button.link.danger { color: var(--danger); }

a.link { color: var(--muted); }
a { color: var(--accent); }

form.inline { display: inline; }

.linkbox {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    width: 100%;
    min-width: 18rem;
}

.msg {
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.msg.ok { background: var(--ok-bg); }
.msg.error { background: var(--err-bg); color: var(--danger); }

.hint { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.empty { color: var(--muted); }

.filename { font-weight: 600; }

.badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.note { display: block; color: var(--muted); font-size: 0.85rem; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 0.7rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: 0.9rem;
}

th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

tbody tr:last-child td { border-bottom: 0; }

.num { text-align: right; }

.ua {
    color: var(--muted);
    font-size: 0.78rem;
    max-width: 22rem;
    overflow-wrap: anywhere;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
}
