body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f7;
    margin: 0;
    padding: 0;
}

.topbar {
    background: #222;
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
}

.topbar a {
    color: #fff;
    text-decoration: underline;
}

.container {
    max-width: 900px;
    margin: 24px auto;
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.08);
}

h1, h2 {
    margin-top: 0;
}

.alert {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #e6ffed;
    border: 1px solid #a1e4b8;
    color: #155724;
}

.alert-error {
    background: #ffe6e6;
    border: 1px solid #f5a3a3;
    color: #721c24;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
button {
    font-family: inherit;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #0070f3;
    color: #fff;
}

button:hover {
    background: #0059c0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 14px;
}

table th {
    background: #f0f0f0;
    text-align: left;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #0070f3;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

.preview-frame {
    width: 100%;
    height: 220px;
    border: 1px solid #ccc;
    background: #fff;
}

.code-area {
    width: 100%;
    height: 180px;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
    white-space: pre;
}
.media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.media-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    width: 180px;
    font-size: 12px;
    background: #fafafa;
    box-sizing: border-box;
}

.media-thumb {
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    display: block;
    margin-bottom: 6px;
    background: #fff;
}

.media-url {
    width: 100%;
    font-size: 11px;
    margin-bottom: 4px;
    padding: 4px;
    box-sizing: border-box;
}
/* mobile tweaks */
@media (max-width: 768px) {
    .topbar {
        font-size: 12px;
        text-align: center;
    }

    .container {
        margin: 12px;
        padding: 16px;
    }

    .preview-frame {
        height: 180px;
    }

    .sig-selector {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .sig-new {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .upload-form {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    button,
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .media-grid {
        flex-direction: column;
    }

    .media-item {
        width: 100%;
    }
}

/* optionale Button-Styles */
.btn-primary {
    background: #0070f3;
    color: #fff;
}

.btn-secondary {
    background: #444;
    color: #fff;
}

.btn-small {
    font-size: 12px;
    padding: 4px 8px;
}
