:root {
    color-scheme: light;
    --bg: #f0f0f1;
    --card: #ffffff;
    --text: #1d2327;
    --muted: #646970;
    --border: #c3c4c7;
    --border-light: #dcdcde;
    --wp-blue: #2271b1;
    --wp-blue-hover: #135e96;
    --wp-sidebar: #1d2327;
    --wp-sidebar-hover: #2c3338;
    --wp-current: #2271b1;
    --danger: #b32d2e;
    --success: #008a20;
    --warning: #dba617;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

a { color: var(--wp-blue); text-decoration: none; }
a:hover { color: var(--wp-blue-hover); }

/* Public view */
.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 64px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.topbar h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 42px); }
.topbar p { margin: 0; color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.card, .auth-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    padding: 24px;
    margin-bottom: 24px;
}
.auth-card { max-width: 420px; margin: 80px auto 0; }
h1, h2 { letter-spacing: -0.01em; }
h2 { margin-top: 0; }
.muted, .description { color: var(--muted); }

/* WordPress-like admin shell */
.wp-admin-like {
    background: #f0f0f1;
    padding-top: 32px;
}
.adminbar {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 14px;
    background: #1d2327;
    color: #f0f0f1;
    font-size: 13px;
}
.adminbar a { color: #f0f0f1; }
.adminbar a:hover { color: #72aee6; }
.adminbar-brand { font-weight: 700; }
.wp-shell {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: calc(100vh - 32px);
}
.wp-sidebar {
    background: var(--wp-sidebar);
    color: #c3c4c7;
    min-height: calc(100vh - 32px);
}
.wp-logo {
    height: 54px;
    display: flex;
    align-items: center;
    padding-left: 16px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.wp-menu {
    display: block;
    padding: 8px 0;
}
.wp-menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 8px 12px 8px 14px;
    color: #c3c4c7;
    text-decoration: none;
}
.wp-menu a:hover { background: var(--wp-sidebar-hover); color: #72aee6; }
.wp-menu a.active {
    background: var(--wp-current);
    color: #fff;
}
.wp-menu a.active::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #f0f0f1;
}
.wp-menu span {
    width: 34px;
    min-width: 34px;
    text-align: center;
    color: inherit;
    font-size: 11px;
    opacity: .85;
}
.wp-content {
    padding: 22px 24px 48px;
}
.wp-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}
.wp-page-header h1 {
    margin: 0 0 4px;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
}
.wp-page-header p { margin: 0; color: var(--muted); }
.wp-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
    gap: 18px;
    align-items: start;
}
.postbox {
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin-bottom: 18px;
}
.postbox-narrow { max-width: 620px; }
.postbox-header {
    border-bottom: 1px solid var(--border-light);
    padding: 0 12px;
    min-height: 40px;
    display: flex;
    align-items: center;
}
.postbox-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.inside { padding: 14px 12px; }
.inside-table { padding: 0; }

/* Forms and buttons */
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row-small { grid-template-columns: 160px minmax(0, 1fr); }
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
    width: 100%;
    min-height: 34px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 6px 8px;
    font: inherit;
    color: var(--text);
    background: #fff;
    box-shadow: 0 0 0 transparent;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
    border-color: var(--wp-blue);
    box-shadow: 0 0 0 1px var(--wp-blue);
    outline: 2px solid transparent;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid var(--wp-blue);
    border-radius: 3px;
    padding: 4px 12px;
    background: #f6f7f7;
    color: var(--wp-blue);
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.button:hover { background: #f0f0f1; color: var(--wp-blue-hover); border-color: var(--wp-blue-hover); }
.button-primary, .button.button-primary, .button:not(.secondary):not(.button-link-delete) {
    background: var(--wp-blue);
    border-color: var(--wp-blue);
    color: #fff;
}
.button-primary:hover, .button.button-primary:hover { background: var(--wp-blue-hover); color: #fff; border-color: var(--wp-blue-hover); }
.button.secondary { background: #f6f7f7; color: var(--wp-blue); border-color: var(--wp-blue); }
.button-small, .button.tiny { min-height: 26px; padding: 2px 8px; font-size: 13px; }
.button-link-delete {
    background: transparent;
    border-color: transparent;
    color: var(--danger);
    padding-left: 0;
    padding-right: 0;
}
.button-link-delete:hover { background: transparent; border-color: transparent; color: #8a2424; }
.major-publishing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}
.actions, .actions-cell { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-cell form { margin: 0; }
.copybox {
    font-family: Consolas, Monaco, monospace;
    background: #f6f7f7;
    border: 1px solid var(--border-light);
    padding: 8px;
    overflow: auto;
    margin: 6px 0 14px;
    word-break: break-all;
}

/* Notices */
.notice {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-left-width: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin: 5px 0 18px;
    padding: 1px 12px;
}
.notice p { margin: .5em 0; }
.notice-success { border-left-color: var(--success); }
.notice-error { border-left-color: var(--danger); }
.alert {
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    background: #fff;
}
.alert.success { border-left: 4px solid var(--success); color: var(--text); }
.alert.error { border-left: 4px solid var(--danger); color: var(--text); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.wp-list-table th, .wp-list-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: top;
}
.wp-list-table th {
    color: #2c3338;
    font-weight: 600;
    background: #fff;
}
.wp-list-table tbody tr:nth-child(odd) { background: #f6f7f7; }
th, td { padding: 12px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 14px; }
.status {
    display: inline-flex;
    border-radius: 2px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 600;
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid var(--border-light);
}
.status-aktiv { background: #edfaef; color: #007017; border-color: #b8e6bf; }
.status-geplant { background: #eff8ff; color: #0a4b78; border-color: #b8dff5; }
.status-abgelaufen { background: #f6f7f7; color: #646970; }

/* Warning cards */
.warning-list { display: grid; gap: 14px; }
.warning {
    border: 1px solid var(--border-light);
    border-left: 6px solid var(--wp-blue);
    padding: 16px;
    background: #fff;
}
.warning-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.warning-meta strong { color: var(--text); }
.warning p { margin-bottom: 8px; }
.warning small { color: var(--muted); }
.warning-level-7, .warning-level-8 { border-left-color: var(--warning); }
.warning-level-9, .warning-level-10 { border-left-color: var(--danger); }
.warning-image {
    display: block;
    max-width: 320px;
    max-height: 180px;
    width: auto;
    height: auto;
    border: 1px solid var(--border-light);
}

@media (max-width: 900px) {
    .wp-shell { grid-template-columns: 1fr; }
    .wp-sidebar { min-height: auto; }
    .wp-menu { display: flex; overflow-x: auto; padding: 0; }
    .wp-menu a { min-width: max-content; }
    .wp-menu a.active::before { display: none; }
    .wp-logo { display: none; }
    .wp-grid, .form-row, .form-row-small { grid-template-columns: 1fr; }
    .wp-page-header, .topbar, .warning-meta { flex-direction: column; }
    nav, .wp-header-actions { justify-content: flex-start; }
}

.wp-admin-footer {
    margin-top: 24px;
    padding-top: 12px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border-light);
}


.checkbox-grid {
    display: grid;
    gap: 8px;
    padding: 6px 0;
}
.checkline {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}
.checkline input {
    width: auto;
    min-height: auto;
}
.log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.log-list li {
    border-left: 4px solid var(--border);
    background: #f6f7f7;
    padding: 8px 10px;
}
.log-success { border-left-color: var(--success) !important; }
.log-warning { border-left-color: var(--warning) !important; }
.log-error { border-left-color: var(--danger) !important; }
.log-info { border-left-color: var(--wp-blue) !important; }
.warning h3 { margin: 10px 0 6px; }
