:root {
    --brand: #0b6e4f;
    --brand-dark: #084c37;
    --bg: #f4f6f8;
    --card: #ffffff;
    --border: #d6dbe1;
    --text: #1f2937;
    --muted: #6b7280;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: 1rem 2rem;
    background: var(--brand);
    color: #fff;
}

.topbar__brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.topbar__sub {
    font-size: .85rem;
    opacity: .8;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

h1 {
    margin: 0 0 .25rem;
    font-size: 1.6rem;
}

.lead {
    margin: 0 0 1.5rem;
    color: var(--muted);
}

/* ---- Drag & Drop -------------------------------------------------------- */
.drop-zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 2rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: var(--card);
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}

.drop-zone--over {
    border-color: var(--brand);
    background: #eaf5f0;
}

.drop-zone--busy {
    border-style: solid;
    border-color: var(--brand);
}

.drop-zone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone--busy .drop-zone__input {
    cursor: default;
    pointer-events: none;
}

.drop-zone__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    pointer-events: none;
    color: var(--muted);
}

.drop-zone__icon {
    color: var(--brand);
}

.drop-zone__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.drop-zone__hint {
    font-size: .85rem;
}

/* ---- Spinner ------------------------------------------------------------ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #d7e7e0;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Protokoll ---------------------------------------------------------- */
.log {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.log__header {
    padding: .65rem 1rem;
    font-weight: 600;
    background: #f0f3f5;
    border-bottom: 1px solid var(--border);
}

.log__body {
    flex: 1;
    min-height: 200px;
    overflow-y: auto;
    padding: .5rem 0;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: .85rem;
}

.log__line {
    display: grid;
    grid-template-columns: 72px 80px 1fr;
    gap: .5rem;
    padding: .25rem 1rem;
    align-items: baseline;
}

.log__line:hover {
    background: #f8fafb;
}

.log__time {
    color: var(--muted);
}

.log__level {
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .03em;
}

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

.log__line--info .log__level { color: var(--brand); }
.log__line--warn .log__level { color: #b45309; }
.log__line--warn { background: #fffbeb; }
.log__line--error .log__level { color: #b91c1c; }
.log__line--error { background: #fef2f2; }
