:root {
    --color-primary: #81A5C0;
    --color-box-bg: #fbf8ef;
    --color-text: #333;
    --color-muted: #777;
    --color-danger: #b03a3a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #eef2f5;
    color: var(--color-text);
    min-height: 100vh;
}

.topbar {
    background: var(--color-primary);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.topbar .brand {
    font-weight: 600;
    font-size: 18px;
    color: white;
    text-decoration: none;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar a {
    color: white;
}

.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 25px 20px 60px;
}

.card {
    background: var(--color-box-bg);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.card.narrow {
    max-width: 420px;
    margin: 40px auto;
}

.card.inactive {
    opacity: 0.65;
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    margin: 18px 0 8px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 500;
}

label.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 11px 13px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

button,
.button {
    font-family: inherit;
    font-size: 15px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
}

button.primary,
.primary.button {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    margin-top: 18px;
    text-decoration: none;
}

.header-row .primary.button {
    margin-top: 0;
}

button.danger {
    background: var(--color-danger);
    color: white;
    padding: 10px 18px;
    font-weight: 600;
}

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

button.copy {
    background: #dfe7ee;
    color: #33546c;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
}

.link-button {
    background: none;
    color: inherit;
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
}

form.inline {
    display: inline;
}

form.toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e6e0d4;
}

.linkrow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.linklabel {
    min-width: 130px;
    color: var(--color-muted);
    font-size: 14px;
}

code {
    background: white;
    border: 1px solid #e6e0d4;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    word-break: break-all;
}

.qr {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.qr img {
    background: white;
    border-radius: 8px;
}

.hint {
    color: var(--color-muted);
    font-size: 14px;
    margin-bottom: 6px;
}

.warn {
    color: #8a6d3b;
    font-weight: 600;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 10px;
}

.flash {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.badge {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge.ok {
    background: #d4edda;
    color: #155724;
}

.badge.off {
    background: #e2e2e2;
    color: #666;
}

/* --- Moderationsraster --- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.tile {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #ddd;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tile input[type="checkbox"] {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    z-index: 2;
    accent-color: var(--color-danger);
}

.tile.checked {
    outline: 3px solid var(--color-danger);
    outline-offset: -3px;
}

.tile.checked img {
    opacity: 0.55;
}

.video-badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
}

.actionbar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--color-box-bg);
    padding: 12px 0;
    border-top: 1px solid #e6e0d4;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    color: var(--color-muted);
}
