.admin-page {
    width: min(100%, var(--dadox-max-width));
    margin: 0 auto;
    padding: 2.4rem 1rem 4rem;
}

.admin-hero {
    max-width: 46rem;
    margin: 0 auto;
    text-align: center;
}

.admin-eyebrow {
    margin: 0 0 0.75rem;
    color: rgba(241, 207, 113, 0.9);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 0.98;
    text-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.admin-title {
    position: relative;
    display: inline-block;
    color: #f6efe4;
}

.admin-title::after {
    content: "Admin";
    position: absolute;
    inset: 0;
    color: transparent;
    background-image: linear-gradient(
        90deg,
        rgba(255, 240, 215, 0) 0%,
        rgba(255, 211, 132, 0.2) 16%,
        rgba(255, 205, 109, 0.95) 46%,
        rgba(255, 247, 230, 1) 50%,
        rgba(255, 205, 109, 0.95) 54%,
        rgba(255, 211, 132, 0.2) 84%,
        rgba(255, 240, 215, 0) 100%
    );
    background-size: 240% 100%;
    background-position: 120% 50%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: dadox-shimmer 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.admin-lead {
    margin: 1.1rem auto 0;
    color: #b8b0a4;
    font-size: 1.03rem;
    font-weight: 600;
    line-height: 1.7;
}

.admin-card {
    width: min(100%, var(--dadox-max-width));
    margin: 2.2rem auto 0;
    padding: 1.35rem;
    border: 1px solid rgba(214, 178, 74, 0.16);
    border-radius: 1.15rem;
    background:
        linear-gradient(180deg, rgba(25, 22, 16, 0.66), rgba(15, 16, 18, 0.88)),
        rgba(16, 18, 22, 0.88);
    box-shadow:
        inset 0 1px 0 rgba(255, 231, 185, 0.04),
        0 18px 40px rgba(0, 0, 0, 0.2);
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-toolbar-right {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-toolbar-left h2 {
    margin: 0;
    color: #f6efe4;
    font-size: 1.2rem;
    font-weight: 800;
}

.admin-toolbar-left p {
    margin: 0.25rem 0 0;
    color: #a7a1ad;
    font-size: 0.92rem;
}

.admin-button {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(230, 193, 88, 0.24);
    background:
        radial-gradient(circle at 15% 50%, rgba(255, 228, 140, 0.15), transparent 35%),
        linear-gradient(180deg, rgba(26, 23, 13, 0.98), rgba(12, 13, 11, 0.98));
    color: #f4dd8a;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-decoration: none;
}

.admin-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.admin-button-danger {
    border-color: rgba(255, 119, 119, 0.22);
    color: #ffd8d8;
    background:
        linear-gradient(180deg, rgba(64, 18, 18, 0.9), rgba(34, 12, 12, 0.9)),
        rgba(34, 12, 12, 0.9);
}

.admin-status {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #d7d0c5;
}

.admin-status-error {
    border-color: rgba(255, 119, 119, 0.22);
    background: rgba(80, 24, 24, 0.28);
    color: #ffd8d8;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.75rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #bbb3a8;
    font-size: 0.93rem;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-table th {
    color: #f6efe4;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pill-ok {
    border-color: rgba(105, 182, 121, 0.22);
    color: #daf1df;
    background: rgba(30, 60, 36, 0.32);
}

.pill-warn {
    border-color: rgba(230, 193, 88, 0.24);
    color: #f4dd8a;
    background: rgba(26, 23, 13, 0.46);
}

.toggle {
    display: inline-flex;
    align-items: center;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-ui {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.toggle-ui::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #f6efe4;
    transform: translateY(-50%);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.toggle input:checked + .toggle-ui {
    background: rgba(105, 182, 121, 0.26);
    border-color: rgba(105, 182, 121, 0.22);
}

.toggle input:checked + .toggle-ui::after {
    transform: translateY(-50%) translateX(18px);
}

/* Admin: gemeinsame Helfer / Tabellen-Zellen */
.admin-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.admin-emails {
    max-width: 28rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-selected td {
    background: rgba(242, 161, 31, 0.06);
}

@keyframes dadox-shimmer {
    0% { background-position: 120% 50%; }
    45% { background-position: 55% 50%; }
    55% { background-position: 45% 50%; }
    100% { background-position: -20% 50%; }
}

@media (max-width: 767.98px) {
    .admin-page { padding: 2rem 1rem 3rem; }
    .admin-card { padding: 1.1rem; }
    .admin-toolbar { flex-direction: column; align-items: stretch; }
    .admin-table { min-width: 720px; }
    .admin-actions { flex-direction: column; align-items: stretch; }
}
