/* =========================================================
   AOGvia Theme Toggle
   Screenshot Style
   ========================================================= */

.aog-theme-toggle {
    position: relative;

    width: 68px;
    min-width: 68px;
    height: 36px;

    padding: 0 11px;

    display: inline-flex;
    align-items: center;
    justify-content: space-between;

    flex: 0 0 68px;

    appearance: none;
    -webkit-appearance: none;

    border: 1px solid #293244;
    border-radius: 999px;

    background:
        linear-gradient(
            180deg,
            #171e2b 0%,
            #111827 100%
        );

    color: #ffffff;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.035),
        0 1px 2px rgba(0,0,0,.16);

    transition:
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease,
        transform .14s ease;
}

/* Hover */

.aog-theme-toggle:hover {
    border-color: #364155;

    background:
        linear-gradient(
            180deg,
            #1c2534 0%,
            #141c2a 100%
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05),
        0 3px 10px rgba(0,0,0,.18);
}

/* Click */

.aog-theme-toggle:active {
    transform: scale(.97);
}

/* Focus */

.aog-theme-toggle:focus {
    outline: none;
}

.aog-theme-toggle:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
}

/* =========================================================
   Theme Symbol
   ========================================================= */

.aog-theme-toggle__mode {
    width: 20px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 20px;

    color: #111827;
    line-height: 0;
}

.aog-theme-toggle__moon,
.aog-theme-toggle__sun {
    display: block;

    width: 18px;
    height: 18px;
}

/* Mond = gefüllt */
.aog-theme-toggle__moon {
    fill: currentColor;
}

/* Sonne = Outline */
.aog-theme-toggle__sun {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dark */
html[data-theme="dark"] .aog-theme-toggle__mode {
    color: #ffffff;
}

/* Light */
html[data-theme="light"] .aog-theme-toggle__mode {
    color: #111827;
}

/* Status dot */
.aog-theme-toggle__status {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #5b8cff;
    box-shadow:
        0 0 0 2px rgba(91,140,255,.08),
        0 0 7px rgba(91,140,255,.32);
}

:root {
    --theme8-bg: #f6f7fb;
    --theme8-surface: #ffffff;
    --theme8-text: #111827;
    --theme8-muted: #6b7280;
    --theme8-border: #e5e7eb;
    --theme8-soft: #f9fafb;
    --theme8-dark: #111827;
    --theme8-radius: 18px;
    --theme8-shadow: 0 14px 38px rgba(15, 23, 42, .06);
}

.theme8-body {
    background: var(--theme8-bg);
    color: var(--theme8-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header */
.theme8-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .84);
    border-bottom: 1px solid var(--theme8-border);
    backdrop-filter: blur(18px);
    box-shadow: none;
    transition: box-shadow .2s ease;
}

.theme8-header.is-scrolled {
    box-shadow: 0 4px 24px rgba(15, 23, 42, .08);
    border-bottom-color: transparent;
}

.theme8-header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.theme8-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--theme8-text);
    font-weight: 950;
    text-decoration: none;
    letter-spacing: -.03em;
}

.theme8-brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.theme8-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 24px;
}

.theme8-nav a {
    padding: 7px 14px;
    border-radius: 8px;
    color: var(--theme8-muted);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.theme8-nav a:hover {
    background: var(--theme8-soft);
    color: var(--theme8-text);
}

.theme8-nav a.is-active {
    background: var(--theme8-soft);
    color: var(--theme8-text);
}

.theme8-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

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

.theme8-language select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 6px center;
    padding: 4px 24px 4px 8px;
    border: 1px solid var(--theme8-border, #e5e7eb);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--theme8-muted, #6b7280);
    cursor: pointer;
    min-width: 110px;
}

.theme8-language select:hover {
    border-color: #111827;
    color: #111827;
}

.t8h-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--theme8-border, #e5e7eb);
    background: #fff;
    color: var(--theme8-muted, #6b7280);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    flex-shrink: 0;
}

.aog-theme-toggle__track {
    display: none !important;
}

/* Beide Icons */
.aog-theme-toggle__icon {
    width: 16px !important;
    height: 16px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 16px !important;

    padding: 0 !important;
    margin: 0 !important;

    color: #111827 !important;

    transition:
        opacity .18s ease,
        transform .18s ease !important;
}

.aog-theme-toggle__icon svg {
    display: block !important;

    width: 16px !important;
    height: 16px !important;

    overflow: visible;
}

html[data-theme="dark"]
.aog-theme-toggle__icon--moon {
    opacity: 1;
    transform: scale(1);
}

html[data-theme="dark"]
.aog-theme-toggle__icon--sun {
    opacity: .78;
    transform: scale(.92);
}

html[data-theme="light"]
.aog-theme-toggle__icon--moon {
    opacity: .78;
    transform: scale(.92);
}

html[data-theme="light"]
.aog-theme-toggle__icon--sun {
    opacity: 1;
    transform: scale(1);
}

/* Hover */
.aog-theme-toggle:hover {
    background: #ffa83d !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 4px 12px rgba(255,157,46,.18) !important;

    transform: translateY(-1px);
}

/* Click */
.aog-theme-toggle:active {
    transform: scale(.97);
}

/* Keyboard */
.aog-theme-toggle:focus {
    outline: none;
}

.aog-theme-toggle:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
}

/* Icons */

.aog-theme-toggle__icon {
    position: relative;

    width: 19px;
    height: 19px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 19px;

    color: #0f172a;

    transition:
        opacity .18s ease,
        transform .18s ease;
}

.aog-theme-toggle__icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

/* ---------------------------------------------------------
   Current theme indication
   Both icons remain visible like in the mockup.
   --------------------------------------------------------- */

html[data-theme="dark"] .aog-theme-toggle__moon {
    opacity: 1;
    transform: scale(1.08);
}

html[data-theme="dark"] .aog-theme-toggle__sun {
    opacity: .76;
    transform: scale(.92);
}

html[data-theme="light"] .aog-theme-toggle__moon {
    opacity: .76;
    transform: scale(.92);
}

html[data-theme="light"] .aog-theme-toggle__sun {
    opacity: 1;
    transform: scale(1.08);
}

/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 720px) {
    .aog-theme-toggle {
        width: 84px;
        flex-basis: 84px;
        height: 38px;
        padding: 0 12px;
        gap: 11px;
    }

    .aog-theme-toggle__icon,
    .aog-theme-toggle__icon svg {
        width: 16px;
        height: 16px;
    }
}
.t8h-icon-btn:hover { border-color: #111827; color: #111827; }

.t8h-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 950;
    line-height: 16px;
    text-align: center;
}

/* Globe: icon overlaid on the hidden-but-functional select */
.t8h-icon-btn-wrap {
    position: relative;
}
.t8h-globe-btn {
    pointer-events: none;
    z-index: 1;
}
.t8h-icon-btn-wrap select {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    font-size: 13px;
}

.t8h-user-menu {
    position: relative;
}
.t8h-avatar {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 10px 0 4px;
    border-radius: 999px;
    border: 1.5px solid var(--theme8-border, #e5e7eb);
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    box-shadow: 0 1px 3px rgba(17,24,39,.07);
}
.t8h-avatar:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(17,24,39,.10);
}
.t8h-avatar[aria-expanded="true"] {
    border-color: #d1d5db;
    background: #f9fafb;
}
/* Coloured initials circle inside the pill */
.t8h-avatar-circle {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.t8h-avatar-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.t8h-chevron { color: #9ca3af; transition: transform .2s; }
.t8h-avatar[aria-expanded="true"] .t8h-chevron { transform: rotate(180deg); }

.t8h-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--theme8-border, #e5e7eb);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(17,24,39,.1);
    z-index: 999;
}
.t8h-dropdown.is-open { display: block; }
.t8h-dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
    color: var(--theme8-text, #111827);
    text-decoration: none;
    transition: background .12s;
}
.t8h-dropdown a:hover { background: var(--theme8-soft, #f9fafb); }
.t8h-dropdown-divider {
    height: 1px;
    background: var(--theme8-border, #e5e7eb);
    margin: 4px 0;
}
.t8h-dropdown-danger { color: #dc2626 !important; }

.theme8-link {
    color: var(--theme8-muted);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.theme8-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--theme8-dark);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

/* Generic Theme8 Buttons */
.theme8-body .btn,
.theme8-body button {
    border-radius: 999px;
    font-weight: 900;
}

.theme8-body .btn-primary,
.theme8-body button.btn-primary {
    background: var(--theme8-dark);
    border-color: var(--theme8-dark);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(17, 24, 39, .15);
}

.theme8-body main.container,
.theme8-body .theme8-admin-page {
    max-width: 1220px;
    margin: 0 auto;
    padding: 26px 18px 70px;
}

.theme8-body .page-header {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--theme8-border);
    border-radius: var(--theme8-radius);
    background: var(--theme8-surface);
    box-shadow: var(--theme8-shadow);
}

.theme8-body .page-header h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
    letter-spacing: -.055em;
}

.theme8-body .page-header p {
    margin: 10px 0 0;
    color: var(--theme8-muted);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 650;
}

/* KPI Cards */
.theme8-body .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.theme8-body .kpi-card {
    padding: 18px;
    border: 1px solid var(--theme8-border);
    border-radius: var(--theme8-radius);
    background: var(--theme8-surface);
    box-shadow: var(--theme8-shadow);
}

.theme8-body .kpi-card span {
    display: block;
    color: var(--theme8-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.theme8-body .kpi-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.05em;
}

.theme8-body .kpi-card small {
    display: block;
    margin-top: 6px;
    color: var(--theme8-muted);
    font-size: 13px;
}

.theme8-body .kpi-card.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

/* Alerts */
.theme8-body .alert,
.theme8-body .panel {
    border-radius: var(--theme8-radius);
    border: 1px solid var(--theme8-border);
    background: var(--theme8-surface);
    box-shadow: var(--theme8-shadow);
}

.theme8-body .alert {
    padding: 14px 16px;
    margin: 14px 0;
    font-weight: 750;
}

.theme8-body .alert.success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.theme8-body .alert.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.theme8-body .alert.info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* Filter Forms */
.theme8-body .filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--theme8-border);
    border-radius: var(--theme8-radius);
    background: var(--theme8-surface);
    box-shadow: var(--theme8-shadow);
}

.theme8-body .filter-form input,
.theme8-body .filter-form select,
.theme8-body .inline-form select,
.theme8-body textarea {
    width: 100%;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 12px;
    border: 1px solid var(--theme8-border);
    background: #ffffff;
    color: var(--theme8-text);
    font-size: 14px;
    outline: none;
}

.theme8-body textarea {
    min-height: 120px;
    padding: 12px 13px;
}

.theme8-body .filter-form input:focus,
.theme8-body .filter-form select:focus,
.theme8-body .inline-form select:focus,
.theme8-body textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

/* Tables */
.theme8-body .table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
    border: 1px solid var(--theme8-border);
    border-radius: var(--theme8-radius);
    background: var(--theme8-surface);
    box-shadow: var(--theme8-shadow);
}

.theme8-body table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.theme8-body thead th {
    padding: 13px 14px;
    color: var(--theme8-muted);
    background: var(--theme8-soft);
    border-bottom: 1px solid var(--theme8-border);
    font-size: 12px;
    font-weight: 950;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.theme8-body tbody td {
    padding: 15px 14px;
    border-bottom: 1px solid var(--theme8-border);
    vertical-align: top;
    font-size: 14px;
}

.theme8-body tbody tr:last-child td {
    border-bottom: none;
}

.theme8-body tbody tr:hover {
    background: var(--theme8-soft);
}

.theme8-body small {
    color: var(--theme8-muted);
}

.theme8-body .row-link,
.theme8-body .user-link {
    color: inherit;
    text-decoration: none;
}

.theme8-body .row-link:hover,
.theme8-body .user-link:hover {
    text-decoration: underline;
}

/* Badges */
.theme8-body .badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.theme8-body .badge.success,
.theme8-body .badge.active,
.theme8-body .badge.checked,
.theme8-body .badge.ok {
    color: #047857;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.theme8-body .badge.error,
.theme8-body .badge.failed,
.theme8-body .badge.cancelled {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.theme8-body .badge.warning,
.theme8-body .badge.pending,
.theme8-body .badge.expired {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.theme8-body .badge.premium {
    color: #7c4a03;
    background: #fff7d6;
    border-color: #fde68a;
}

.theme8-body .badge.free,
.theme8-body .badge.muted,
.theme8-body .badge.inactive {
    color: #4b5563;
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.theme8-body .badge.aog,
.theme8-body .badge.urgent {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fecaca;
}

.theme8-body .badge.normal {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Details Pages */
.theme8-body .details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.theme8-body .detail-item {
    padding: 13px;
    border: 1px solid var(--theme8-border);
    border-radius: 14px;
    background: #f9fafb;
}

.theme8-body .detail-item label {
    display: block;
    margin-bottom: 5px;
    color: var(--theme8-muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.theme8-body .detail-item span {
    display: block;
    color: var(--theme8-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.theme8-body .panel {
    padding: 20px;
    margin-bottom: 16px;
}

.theme8-body .panel h2,
.theme8-body .panel h3 {
    margin-top: 0;
    letter-spacing: -.025em;
}

/* Request Detail Checklist */
.theme8-body .review-checklist {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.theme8-body .check-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--theme8-border);
    border-radius: 14px;
    background: #f9fafb;
}

.theme8-body .check-item.ok {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.theme8-body .check-item.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.theme8-body .check-item.error {
    background: #fef2f2;
    border-color: #fecaca;
}

.theme8-body .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Inline Forms */
.theme8-body .inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.theme8-body .btn-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

/* Footer */
.theme8-footer {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 26px 32px;
    color: var(--theme8-muted);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.theme8-footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-top: 22px;
    border-top: 1px solid var(--theme8-border);
}

.theme8-footer strong {
    display: block;
    color: var(--theme8-text);
    font-size: 14px;
    font-weight: 950;
}

.theme8-footer span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
}

.theme8-footer nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.theme8-footer a {
    color: var(--theme8-muted);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.theme8-footer a:hover {
    color: var(--theme8-text);
}

/* Mobile */
@media (max-width: 980px) {
    .theme8-header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
        gap: 8px;
    }

    .theme8-nav {
        order: 3;
        flex-basis: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 18px;
    }

    .theme8-nav::-webkit-scrollbar { display: none; }

    .theme8-actions {
        margin-left: auto;
    }

    .theme8-body .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme8-body .filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .theme8-header-inner {
        padding: 12px 14px;
    }

    .theme8-nav a {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    .theme8-actions {
        justify-content: space-between;
    }

    .theme8-body main.container,
    .theme8-body .theme8-admin-page {
        padding: 18px 12px 54px;
    }

    .theme8-body .kpi-grid,
    .theme8-body .filter-form,
    .theme8-body .details-grid {
        grid-template-columns: 1fr;
    }

    .theme8-body .filter-form .btn,
    .theme8-body .filter-form button {
        width: 100%;
    }

    .theme8-footer {
        padding: 0 14px 28px;
    }

    .theme8-footer__inner {
        flex-direction: column;
    }
}

.cookie8-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(4px);
}

.cookie8-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.cookie8-banner[hidden] { display: none !important; }
.cookie8-backdrop[hidden] { display: none !important; }

.cookie8-card {
    width: min(920px, 100%);
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 14px 40px rgba(17,24,39,.08);
    pointer-events: auto;
    animation: cookie8SlideUp .34s cubic-bezier(.22,1,.36,1) both;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

@keyframes cookie8SlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cookie8-head {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-items: start;
}

.cookie8-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f3f4f6;
    font-size: 22px;
    flex-shrink: 0;
}

.cookie8-head strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.03em;
    color: #111827;
}

.cookie8-head p {
    margin: 6px 0 0;
    color: #6b7280;
    line-height: 1.55;
    font-size: 14px;
    font-weight: 600;
}

.cookie8-settings {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.cookie8-settings[hidden] { display: none !important; }

.cookie8-option {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: background .14s, border-color .14s;
}

.cookie8-option:not(.is-disabled):hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.cookie8-option input {
    margin-top: 2px;
    accent-color: #111827;
    cursor: pointer;
}

.cookie8-option strong {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: #111827;
}

.cookie8-option small {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    line-height: 1.45;
    font-size: 12px;
    font-weight: 700;
}

.cookie8-option.is-disabled {
    opacity: .7;
    cursor: not-allowed;
}

.cookie8-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.cookie8-links a,
.cookie8-link-btn {
    color: #6b7280;
    text-decoration: none;
    font-weight: 800;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.cookie8-links a:hover,
.cookie8-link-btn:hover { color: #111827; text-decoration: underline; }

.cookie8-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.cookie8-btn {
    min-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .15s, background .15s, border-color .15s;
    white-space: nowrap;
}

.cookie8-btn[hidden] { display: none !important; }

.cookie8-btn:hover { background: #f9fafb; border-color: #d1d5db; transform: translateY(-1px); }

.cookie8-btn.primary {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(17,24,39,.18);
}

.cookie8-btn.primary:hover { background: #1f2937; border-color: #1f2937; }

.cookie8-btn.ghost { background: transparent; }

@media (max-width: 680px) {
    .cookie8-banner { left: 12px; right: 12px; bottom: 12px; }
    .cookie8-card { padding: 18px; border-radius: 16px; }
    .cookie8-head { grid-template-columns: 1fr; }
    .cookie8-icon { margin-bottom: 4px; }
    .cookie8-actions { flex-direction: column; justify-content: stretch; }
    .cookie8-btn { width: 100%; justify-content: center; display: flex; align-items: center; }
}

/* =========================================================
   Bell / Globe / other icon buttons (dark)
   ========================================================= */

html[data-theme="dark"] .t8h-icon-btn {
    background:
        linear-gradient(
            180deg,
            #171e2b 0%,
            #111827 100%
        );

    border-color: #293244;
    color: #f8fafc;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.035),
        0 1px 2px rgba(0,0,0,.16);
}

html[data-theme="dark"] .t8h-icon-btn:hover {
    background:
        linear-gradient(
            180deg,
            #1c2534 0%,
            #141c2a 100%
        );

    border-color: #364155;
    color: #ffffff;
}

/* =========================================================
   Admin avatar pill (dark)
   ========================================================= */

html[data-theme="dark"] .t8h-avatar {
    height: 36px;

    background:
        linear-gradient(
            180deg,
            #171e2b 0%,
            #111827 100%
        );

    border-color: #293244;

    color: #ffffff;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.035),
        0 1px 2px rgba(0,0,0,.16);
}

html[data-theme="dark"] .t8h-avatar-name {
    color: #ffffff;
}

html[data-theme="dark"] .t8h-avatar-circle {
    background: #111827;
    color: #ffffff;
}

html[data-theme="dark"] .t8h-chevron {
    color: #cbd5e1;
}

html[data-theme="dark"] .t8h-avatar:hover,
html[data-theme="dark"] .t8h-avatar[aria-expanded="true"] {
    background:
        linear-gradient(
            180deg,
            #1c2534 0%,
            #141c2a 100%
        );

    border-color: #364155;
}

/* =========================================================
   FINAL THEME TOGGLE OVERRIDE
   ========================================================= */

html[data-theme="dark"] .theme8-header .aog-theme-toggle {
    background: linear-gradient(
        180deg,
        #252f42 0%,
        #1e2a3a 100%
    ) !important;

    border: 1px solid #3d4f66 !important;

    width: 68px !important;
    min-width: 68px !important;
    flex-basis: 68px !important;
    padding: 0 11px !important;

    color: #ffffff !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 1px 3px rgba(0,0,0,.35) !important;
}

html[data-theme="dark"] .theme8-header .aog-theme-toggle:hover {
    background: linear-gradient(
        180deg,
        #2e3b52 0%,
        #263244 100%
    ) !important;

    border-color: #4f6480 !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.09),
        0 3px 10px rgba(0,0,0,.30) !important;
}

/* Light Mode */
html[data-theme="light"] .theme8-header .aog-theme-toggle {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #f8fafc 100%
    ) !important;

    border: 1px solid #e2e8f0 !important;

    width: 48px !important;
    min-width: 48px !important;
    flex-basis: 48px !important;
    padding: 0 10px !important;

    color: #111827 !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 1px 3px rgba(15,23,42,.06) !important;
}

html[data-theme="dark"] .aog-theme-toggle__status {
    background: #5b8cff !important;

    box-shadow:
        0 0 0 2px rgba(91,140,255,.08),
        0 0 7px rgba(91,140,255,.32) !important;
}

html[data-theme="light"] .aog-theme-toggle__status {
    background: #5b8cff !important;

    box-shadow:
        0 0 0 2px rgba(91,140,255,.08),
        0 0 7px rgba(91,140,255,.32) !important;
}

