body {
    margin: 0;
}

.admin-branding {
    margin: 0;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.admin-branding-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 54px;
    padding: 8px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #ecfeff 100%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.admin-branding-badge::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 12px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    pointer-events: none;
}

.admin-branding-logo {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

.admin-branding-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.05;
}

.admin-branding-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.admin-branding-subtitle {
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin-container {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.admin-sidebar {
    flex: 0 0 240px;
}

.sidebar {
    width: 240px;
    background: #1f2937;
    color: white;
    min-height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.sidebar h2 {
    color: #38bdf8;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar a {
    display: block;
    color: white;
    padding: 10px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
}

.sidebar a:hover {
    background: #374151;
}

.main-content {
    flex: 1;
    padding: 20px;
    min-width: 0;
}

.messagelist,
.messagelist + p {
    display: none;
}

#changelist-filter h2,
.changelist-filter-header {
    display: none;
}

.dashboard-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.dashboard-card {
    display: block;
    width: 240px;
    padding: 22px;
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    border: 1px solid #dbe3ef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card,
.dashboard-card:hover,
.dashboard-card:focus,
.dashboard-card:active,
.dashboard-card:visited {
    text-decoration: none;
    color: #111827;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.dashboard-card-label {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.dashboard-card-value {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.dashboard-card-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
}

.user-view-wrap {
    max-width: 760px;
}

.user-view-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.user-view-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e5e7eb;
}

.user-view-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.user-view-subtitle {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 12px;
}

.user-view-body {
    padding: 4px 18px 14px;
}

.user-view-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.user-view-row:last-child {
    border-bottom: 0;
}

.user-view-label {
    min-width: 160px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.user-view-value {
    flex: 1;
    font-size: 13px;
    font-weight: 400;
    color: #111827;
    text-align: right;
    word-break: break-word;
}

.user-view-actions {
    margin-top: 12px;
}

.user-view-back {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    background: #1f2937;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.user-view-back:hover,
.user-view-back:focus,
.user-view-back:active,
.user-view-back:visited {
    color: #ffffff;
    text-decoration: none;
    background: #111827;
}

.admin-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-pagination-reset {
    padding: 8px 14px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.admin-pagination-reset:hover,
.admin-pagination-reset:focus,
.admin-pagination-reset:active,
.admin-pagination-reset:visited {
    color: #7c2d12;
    text-decoration: none;
    background: #ffedd5;
}

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

    .admin-sidebar {
        flex: none;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 14px 16px;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar a {
        flex: 1 1 180px;
        text-align: center;
        padding: 12px 14px;
        background: rgba(255, 255, 255, 0.06);
    }

    .main-content {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .sidebar {
        padding: 12px;
    }

    .sidebar-nav {
        gap: 6px;
    }

    .sidebar a {
        flex-basis: 100%;
        font-size: 14px;
    }

    .main-content {
        padding: 12px;
    }

    .dashboard-cards {
        gap: 12px;
    }

    .dashboard-card {
        width: 100%;
        padding: 18px;
    }

    .dashboard-card-value {
        font-size: 28px;
    }

    .user-view-row {
        flex-direction: column;
        gap: 8px;
    }

    .user-view-value {
        text-align: left;
    }
}
