.container-wide {
    max-width: 1400px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.visitor-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.visitor-sidebar h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: #2d5a2d;
}

.sidebar-sub {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #7a8f7a;
}

.sidebar-empty {
    margin: 0;
    font-size: 0.85rem;
    color: #7a8f7a;
}

.visitor-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.visitor-list li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e8efe8;
}

.visitor-list li:last-child {
    border-bottom: none;
}

.visitor-time {
    font-size: 0.75rem;
    color: #7a8f7a;
}

.visitor-list a {
    color: #2d5a2d;
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
    text-decoration: none;
    word-break: break-all;
}

.visitor-list a:hover {
    text-decoration: underline;
}

.admin-main {
    min-width: 0;
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.admin-header h1 {
    margin: 0 0 0.25rem;
}

.admin-header p {
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.button-link {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: #3d7a3d;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.button-link:hover {
    background: #2d5a2d;
}

.button-link-muted {
    background: #e8efe8;
    color: #2d5a2d;
}

.button-link-muted:hover {
    background: #d5e4d5;
}

.button-link-external {
    background: #2a4a6b;
}

.button-link-external:hover {
    background: #1e3a5f;
}

.button-link-form {
    background: #4a8f4a;
}

.button-link-form:hover {
    background: #3d7a3d;
}

.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2ebe2;
}

th {
    background: #f7faf7;
    color: #2d5a2d;
    font-weight: 600;
    white-space: nowrap;
}

tbody tr:hover {
    background: #f9fcf9;
}

td:last-child {
    max-width: 200px;
    word-break: break-word;
}

.nowrap {
    white-space: nowrap;
}

.ip-cell a {
    color: #2d5a2d;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    text-decoration: none;
}

.ip-cell a:hover {
    text-decoration: underline;
}

.text-muted {
    color: #7a8f7a;
    font-size: 0.85rem;
}

.zaehler-cell {
    font-size: 0.85rem;
    white-space: nowrap;
}

.badge-ok,
.badge-warn {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.badge-warn {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #e8f4fd;
    color: #0c5460;
    border: 1px solid #bee5eb;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .visitor-sidebar {
        position: static;
        max-height: 240px;
    }
}

@media (max-width: 700px) {
    .admin-header {
        flex-direction: column;
    }
}
