/*
 * Slate Fan Base — основна темна тема.
 * Цей файл завантажується після сторінкових стилів і не змінює бізнес-логіку.
 */

:root {
    color-scheme: dark;
    --theme-bg: #070b14;
    --theme-bg-deep: #050812;
    --theme-surface: #101827;
    --theme-surface-raised: #141f31;
    --theme-surface-soft: #18253a;
    --theme-border: #293950;
    --theme-border-strong: #3a4e69;
    --theme-text: #e8eef8;
    --theme-text-strong: #f8fbff;
    --theme-muted: #9aabc2;
    --theme-accent: #6aaeff;
    --theme-accent-strong: #3b82f6;
    --theme-accent-soft: rgba(59, 130, 246, 0.16);
    --theme-success: #63dfa0;
    --theme-success-bg: rgba(34, 197, 94, 0.14);
    --theme-warning: #f3c969;
    --theme-warning-bg: rgba(245, 158, 11, 0.14);
    --theme-danger: #ff8998;
    --theme-danger-bg: rgba(244, 63, 94, 0.14);
    --theme-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
    --theme-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.2);

    --auth-bg: var(--theme-bg) !important;
    --auth-card: var(--theme-surface) !important;
    --auth-border: var(--theme-border) !important;
    --auth-text: var(--theme-text) !important;
    --auth-muted: var(--theme-muted) !important;
    --auth-primary: var(--theme-accent-strong) !important;
    --auth-primary-hover: #2563eb !important;
    --auth-danger-bg: var(--theme-danger-bg) !important;
    --auth-danger-border: rgba(255, 137, 152, 0.45) !important;
    --auth-danger-text: #ffabb6 !important;
    --auth-success-bg: var(--theme-success-bg) !important;
    --auth-success-border: rgba(99, 223, 160, 0.42) !important;
    --auth-success-text: #8cebb8 !important;
}

html {
    background: var(--theme-bg-deep);
}

body {
    background:
        radial-gradient(circle at 8% -10%, rgba(37, 99, 235, 0.16), transparent 32rem),
        radial-gradient(circle at 95% 10%, rgba(14, 165, 233, 0.08), transparent 28rem),
        var(--theme-bg) !important;
    color: var(--theme-text) !important;
}

::selection {
    background: rgba(106, 174, 255, 0.3);
    color: var(--theme-text-strong);
}

* {
    scrollbar-color: #425a78 var(--theme-bg-deep);
}

h1,
h2,
h3,
h4,
h5,
h6,
legend,
strong,
b,
dt {
    color: var(--theme-text-strong);
}

p,
dd,
small,
time {
    color: inherit;
}

a {
    color: var(--theme-accent);
}

a:hover {
    color: #9bc8ff;
}

:focus-visible {
    outline: 3px solid rgba(106, 174, 255, 0.38) !important;
    outline-offset: 2px;
}

.site-header {
    background: rgba(8, 13, 23, 0.88) !important;
    border-bottom-color: var(--theme-border) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
}

.site-logo {
    color: var(--theme-text-strong) !important;
}

.site-navigation a {
    color: #b8c6d9 !important;
}

.site-navigation a:hover {
    color: var(--theme-text-strong) !important;
}

.site-navigation .site-navigation__logout {
    color: var(--theme-danger) !important;
}

.site-footer {
    background: rgba(8, 13, 23, 0.9) !important;
    border-top-color: var(--theme-border) !important;
}

.site-footer p,
.dashboard__subtitle,
.page-header__subtitle,
.user-card__status,
.dashboard-action span {
    color: var(--theme-muted) !important;
}

.site-content > .flash-message {
    width: min(1060px, calc(100% - 32px));
    margin: 20px auto 0;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 12px;
    box-shadow: var(--theme-shadow-soft);
}

.site-content > .flash-message--success {
    border-color: rgba(99, 223, 160, 0.42) !important;
    background: var(--theme-success-bg) !important;
    color: #a6f2c9 !important;
}

.site-content > .flash-message--error {
    border-color: rgba(255, 137, 152, 0.45) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffb3bd !important;
}

section,
.card,
.user-card,
.dashboard-action {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    box-shadow: var(--theme-shadow-soft);
}

.card__header {
    border-bottom-color: var(--theme-border) !important;
}

.card__title,
.page-header__title,
.user-card__name,
.dashboard-action {
    color: var(--theme-text-strong) !important;
}

.user-card__avatar {
    background: linear-gradient(145deg, #2563eb, #0ea5e9) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.dashboard-action:hover {
    border-color: var(--theme-border-strong) !important;
    background: var(--theme-surface-raised) !important;
    box-shadow: var(--theme-shadow);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea,
select {
    border-color: var(--theme-border-strong) !important;
    background-color: #0b1220 !important;
    color: var(--theme-text) !important;
    caret-color: var(--theme-accent);
}

input::placeholder,
textarea::placeholder {
    color: #6f819a !important;
    opacity: 1;
}

input:disabled,
textarea:disabled,
select:disabled,
input[readonly],
textarea[readonly] {
    background-color: #111a29 !important;
    color: #9aabc2 !important;
    opacity: 1;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--theme-accent-strong);
}

button,
.button,
.ui-button,
input[type="submit"] {
    font: inherit;
}

.button--primary,
.ui-button--primary,
.auth-security-button,
.auth-security-link--primary,
.referral-copy-row button,
.referral-editor__save,
.referral-media-card button:not(.referral-media-remove),
.wallet-verification button,
.wallet-connect button,
.raffle-entry-form__button,
.raffle-confirmation__button {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.2);
}

.button--primary:hover,
.ui-button--primary:hover,
.auth-security-button:hover,
.auth-security-link--primary:hover,
.referral-copy-row button:hover,
.referral-editor__save:hover,
.wallet-verification button:hover,
.wallet-connect button:hover,
.raffle-entry-form__button:hover,
.raffle-confirmation__button:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6) !important;
}

.button--secondary,
.ui-button--secondary,
.admin-raffles .button--secondary,
.notification-card .button--secondary {
    border-color: var(--theme-border-strong) !important;
    background: var(--theme-surface-soft) !important;
    color: var(--theme-text) !important;
}

.button--secondary:hover,
.ui-button--secondary:hover,
.admin-raffles .button--secondary:hover,
.notification-card .button--secondary:hover {
    border-color: #5c7596 !important;
    background: #21314a !important;
    color: var(--theme-text-strong) !important;
}

.ui-button--danger,
.button--danger {
    border-color: #e11d48 !important;
    background: #be123c !important;
    color: #ffffff !important;
}

table {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

th {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-soft) !important;
    color: #c8d5e7 !important;
}

td {
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

tbody tr:hover {
    background: rgba(106, 174, 255, 0.055);
}

/* Додатковий простір не дає рамкам торкатися літер. */
button:not(.site-navigation__logout),
.button,
.ui-button,
input[type="submit"] {
    min-height: 42px;
    padding: 9px 16px !important;
    line-height: 1.4 !important;
    overflow: visible;
}

.site-navigation__logout {
    min-height: auto;
    padding: 0 !important;
    line-height: inherit !important;
}

th,
td {
    padding: 12px 14px !important;
    line-height: 1.5 !important;
    vertical-align: middle;
}

.status-badge,
.wallet-status,
.referral-status,
.raffle-prize-result__status {
    padding: 6px 10px !important;
    line-height: 1.35 !important;
}

code,
pre,
kbd {
    border-color: var(--theme-border) !important;
    background: #080e19 !important;
    color: #b9d7ff !important;
}

hr {
    border-color: var(--theme-border);
}

details {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
}

/* Авторизація й перевірка email */
.auth-security-page {
    color: var(--theme-text) !important;
}

.auth-security-card {
    border-color: var(--theme-border) !important;
    background: rgba(16, 24, 39, 0.96) !important;
    box-shadow: var(--theme-shadow) !important;
}

.auth-security-card__lead,
.auth-security-card__note,
.auth-security-password-rules,
.auth-security-help {
    color: var(--theme-muted) !important;
}

.auth-security-divider {
    border-color: var(--theme-border) !important;
}

.password-validator,
.password-requirements {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
    color: var(--theme-muted) !important;
}

.password-error {
    border-color: rgba(255, 137, 152, 0.45) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffb3bd !important;
}

.registration-form__errors {
    border-color: rgba(255, 137, 152, 0.45) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffb3bd !important;
}

.password-rule,
.password-rule::before,
.field-error {
    color: var(--theme-danger) !important;
}

.password-rule.is-valid,
.password-rule.is-valid::before,
.password-success {
    color: var(--theme-success) !important;
}

/* Сповіщення */
.notifications-page__header > div > p,
.notification-card time {
    color: var(--theme-muted) !important;
}

.notifications-list,
.notifications-empty,
.notification-settings {
    box-shadow: none;
}

.notification-card {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    box-shadow: var(--theme-shadow-soft);
}

.notification-card--unread {
    border-color: #31588a !important;
    border-left-color: var(--theme-accent-strong) !important;
    background: linear-gradient(100deg, rgba(37, 99, 235, 0.16), var(--theme-surface) 46%) !important;
}

.notification-card__type {
    color: #80b8ff !important;
}

.notifications-empty,
.notification-settings {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
}

/* Реферальний модуль */
.referral-page,
.referral-editor,
.invite-page {
    color: var(--theme-text) !important;
}

.referral-page__header p,
.referral-link-card__label,
.referral-stats span,
.referral-section__heading p,
.referral-coming-soon,
.referral-code-item span,
.referral-user div span,
.referral-user small,
.invite-identity span,
.invite-hero__lead,
.invite-community span,
.invite-footer,
.referral-editor__header span,
.referral-editor__media-heading p,
.referral-media-card > p,
.referral-editor__hint {
    color: var(--theme-muted) !important;
}

.referral-page__eyebrow,
.referral-back,
.referral-stats strong,
.invite-card__label,
.referral-editor__header p,
.referral-editor__actions a {
    color: var(--theme-accent) !important;
}

.referral-back,
.referral-editor__actions a {
    border-color: var(--theme-border-strong) !important;
    background: rgba(20, 31, 49, 0.72) !important;
}

.referral-link-card,
.referral-section,
.referral-stats article,
.referral-editor__media,
.referral-editor__card,
.referral-media-card,
.invite-card,
.invite-hero {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    box-shadow: var(--theme-shadow-soft) !important;
}

.referral-link-card,
.invite-hero {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.17), rgba(14, 165, 233, 0.07)),
        var(--theme-surface) !important;
}

.referral-code-item,
.referral-empty,
.referral-media-preview,
.referral-editor__hint,
.invite-community div {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
}

.referral-user {
    border-color: var(--theme-border) !important;
    background: rgba(20, 31, 49, 0.52);
}

.referral-coming-soon {
    background: var(--theme-warning-bg) !important;
    color: #f0d58a !important;
}

.referral-copy-status {
    color: var(--theme-success) !important;
}

.referral-badge,
.referral-status--qualified,
.referral-status--rewarded {
    background: var(--theme-success-bg) !important;
    color: #8cebb8 !important;
}

.referral-status--registered {
    background: var(--theme-accent-soft) !important;
    color: #9bc8ff !important;
}

.referral-status--cancelled,
.referral-editor__alert {
    border-color: rgba(255, 137, 152, 0.4) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffabb6 !important;
}

.invite-page {
    --soft: rgba(59, 130, 246, 0.15) !important;
    --soft2: rgba(14, 165, 233, 0.07) !important;
}

.invite-page--mint {
    --soft: rgba(16, 185, 129, 0.14) !important;
    --soft2: rgba(20, 184, 166, 0.07) !important;
}

.invite-page--sunset {
    --soft: rgba(249, 115, 22, 0.15) !important;
    --soft2: rgba(245, 158, 11, 0.07) !important;
}

.invite-page--violet {
    --soft: rgba(139, 92, 246, 0.16) !important;
    --soft2: rgba(168, 85, 247, 0.07) !important;
}

.invite-card--personal {
    background: var(--theme-surface-raised) !important;
}

.invite-preview-bar {
    background: #080e19 !important;
    color: var(--theme-text) !important;
}

.referral-media-card .referral-media-remove {
    border-color: rgba(255, 137, 152, 0.42) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffabb6 !important;
}

/* Гаманці */
.wallets__summary,
.wallets__empty,
.wallets__limit,
.wallet-card,
.wallet-connect,
.wallet-verification,
.wallet-verification__instructions,
.wallet-verification__details input,
.wallet-replacement {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.wallet-card--primary,
.wallet-verification--active {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6, var(--theme-shadow-soft) !important;
}

.wallet-card__details dt,
.wallet-card__notice,
.wallet-connect__description,
.wallet-form__help,
.wallet-verification p,
.wallet-verification__details dt,
.wallet-verification__instructions ol {
    color: var(--theme-muted) !important;
}

.wallet-card__type {
    background: var(--theme-accent-soft) !important;
    color: #9bc8ff !important;
}

.wallet-status--verified {
    background: var(--theme-success-bg) !important;
    color: #8cebb8 !important;
}

.wallet-status--pending,
.wallet-verification__warning,
.wallet-verification__confirmation {
    border-color: rgba(243, 201, 105, 0.4) !important;
    background: var(--theme-warning-bg) !important;
    color: #f4d98e !important;
}

.wallet-form__errors,
.wallet-form__error {
    border-color: rgba(255, 137, 152, 0.42) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffabb6 !important;
}

.wallet-replacement summary {
    color: var(--theme-accent) !important;
}

.wallet-replacement summary:hover {
    background: var(--theme-surface-soft) !important;
}

/* Адміністративні сторінки */
.admin-raffles,
.admin-page,
.admin-users-page {
    color: var(--theme-text) !important;
}

.admin-page-header p,
.admin-panel__header p,
.admin-empty-state p,
.admin-raffle-card__id,
.admin-config-card__code,
.admin-raffle-card__description,
.admin-readonly-list dt,
.admin-inline-details dt,
.admin-form__section-note,
.form-field__hint,
.admin-config-card p,
.admin-summary-card span,
.admin-participants-table td small,
.admin-role-item code,
.admin-role-assignment small {
    color: var(--theme-muted) !important;
}

.admin-empty-state,
.admin-panel,
.admin-raffle-card,
.admin-config-card,
.admin-summary-card,
.admin-role-item,
.admin-user-card,
.admin-create-section,
.admin-inline-details div,
.admin-config-card__actions details,
.admin-role-assignment {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    box-shadow: var(--theme-shadow-soft);
}

.admin-inline-details div,
.admin-config-card__actions details,
.admin-role-assignment {
    background: var(--theme-surface-raised) !important;
    box-shadow: none;
}

.admin-form__section,
.admin-readonly-list,
.admin-participants-table,
.admin-participants-table th,
.admin-participants-table td {
    border-color: var(--theme-border) !important;
}

.admin-readonly-list dd,
.admin-inline-details dd,
.admin-form__section legend,
.form-field label,
.admin-summary-card strong,
.admin-participants-table td,
.admin-participants-table td code {
    color: var(--theme-text) !important;
}

.admin-participants-table,
.admin-participants-table td {
    background: var(--theme-surface) !important;
}

.admin-participants-table th {
    background: var(--theme-surface-soft) !important;
    color: #c8d5e7 !important;
}

.admin-inline-message--error,
.admin-form-errors {
    border-color: rgba(255, 137, 152, 0.42) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffabb6 !important;
}

.admin-inline-message--warning,
.admin-form-note {
    border-color: rgba(243, 201, 105, 0.4) !important;
    background: var(--theme-warning-bg) !important;
    color: #f4d98e !important;
}

.admin-empty-note,
.admin-user-public-id {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
    color: var(--theme-accent) !important;
}

.admin-danger-button {
    border-color: rgba(255, 137, 152, 0.55) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffabb6 !important;
}

/* Розіграші */
.raffles-page,
.raffles-page p,
.raffles-page dd,
.raffles-page label {
    color: var(--theme-text);
}

.raffles-identity__copy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.raffles-identity__value {
    border: 1px solid #426182 !important;
    background: #0a1220 !important;
    color: var(--theme-text-strong) !important;
    line-height: 1.35 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.raffles-identity__copy {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 14px;
    padding: 11px 14px !important;
    text-align: left;
    cursor: copy;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.raffles-identity__copy:hover {
    border-color: var(--theme-accent) !important;
    background: #101d31 !important;
    transform: translateY(-1px);
}

.raffles-identity__copy.is-copied {
    border-color: rgba(99, 223, 160, 0.65) !important;
    background: var(--theme-success-bg) !important;
}

.raffles-identity__copy > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.raffles-identity__copy small {
    flex: 0 0 auto;
    padding-left: 14px;
    border-left: 1px solid var(--theme-border-strong);
    color: var(--theme-accent) !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.35;
    text-transform: uppercase;
}

.raffles-identity__copy.is-copied small {
    color: var(--theme-success) !important;
}

.raffles-identity__copy-status {
    min-height: 1.4em;
    color: var(--theme-success);
    font-size: 0.88rem;
}

.raffles-identity__value,
.raffles-summary__item strong,
.raffle-entry__details dd,
.active-raffle__details dd,
.raffles-active__list > .active-raffle h3,
.raffles-public-results__list > .raffle-public-result h3,
.raffles-history__list > .raffle-entry h3,
.raffle-my-prize__header h3,
.raffle-my-prize__details strong {
    color: var(--theme-text-strong) !important;
}

.raffles-summary__item span,
.raffle-entry__details dt,
.raffle-entry__details dd span,
.raffles-section-header p,
.active-raffle__label,
.active-raffle__description,
.active-raffle__details dt,
.raffle-entry-form label,
.raffle-entry-form__notice,
.raffle-progress__steps small,
.raffle-progress__note,
.raffle-my-prize__header > div > span,
.raffle-my-prize__details span,
.raffles-history__list > .raffle-entry dt,
.raffles-history__list > .raffle-entry small,
.raffles-history__list > .raffle-entry span:not(.status-badge) {
    color: var(--theme-muted) !important;
}

.raffles-active,
.raffles-history,
.raffles-public-results,
.raffles-my-prizes,
.raffle-public-candidates,
.raffle-progress,
.raffle-second-round-entry,
.raffle-confirmation,
.raffle-public-result,
.raffle-prize-result,
.raffle-my-prize,
.raffle-entry,
.active-raffle,
.raffle-code-strip,
.raffle-code-strip td {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

.raffle-progress__steps li,
.raffle-public-candidate,
.raffle-prize-result__position,
.active-raffle__availability {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
    color: var(--theme-text) !important;
}

.raffle-progress__steps li.is-current {
    border-color: #4d8fdc !important;
    background: var(--theme-accent-soft) !important;
}

.raffle-progress__steps li.is-complete {
    border-color: rgba(99, 223, 160, 0.45) !important;
    background: var(--theme-success-bg) !important;
}

.raffle-confirmation {
    border-color: rgba(243, 201, 105, 0.4) !important;
    background: var(--theme-warning-bg) !important;
}

.raffle-confirmation__message strong {
    color: #f4d98e !important;
}

.raffle-confirmation-success {
    border-color: rgba(99, 223, 160, 0.42) !important;
    background: var(--theme-success-bg) !important;
    color: #8cebb8 !important;
}

.raffle-confirmation-expired {
    border-color: rgba(255, 137, 152, 0.42) !important;
    background: var(--theme-danger-bg) !important;
    color: #ffabb6 !important;
}

.raffles-active__list > .active-raffle,
.raffles-public-results__list > .raffle-public-result,
.raffles-history__list > .raffle-entry,
.raffles-my-prizes__list > .raffle-my-prize {
    border-color: var(--theme-border) !important;
    background:
        linear-gradient(145deg, rgba(59, 130, 246, 0.08), transparent 62%),
        var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

/* Підвищений контраст тексту в кабінеті розіграшів. */
.raffles-page h2,
.raffles-page h3,
.raffles-page h4,
.raffles-page strong,
.raffles-page dd,
.raffles-page .raffle-progress__steps strong,
.raffles-page .active-raffle__availability > span,
.raffles-page .raffle-second-round-entry > strong {
    color: #ffffff !important;
}

.raffles-page p,
.raffles-page dt,
.raffles-page small,
.raffles-page .active-raffle__label,
.raffles-page .active-raffle__description,
.raffles-page .raffle-progress__note,
.raffles-page .raffle-progress__steps small,
.raffles-page .raffle-second-round-entry p,
.raffles-page .raffles-section-header p,
.raffles-page .raffle-entry__details dd span {
    color: #d7e2f0 !important;
}

.raffles-page a:not(.button) {
    color: #8fc5ff !important;
    text-decoration-color: rgba(143, 197, 255, 0.65) !important;
}

.raffles-page a:not(.button):hover,
.raffles-page a:not(.button):focus-visible {
    color: #c7e2ff !important;
}

/* Кожна картка розіграшу має власний темний відтінок. */
.raffles-active__list > :nth-child(6n + 1),
.raffles-public-results__list > :nth-child(6n + 1),
.raffles-history__list > :nth-child(6n + 1) {
    border-color: #3b82f6 !important;
    background:
        linear-gradient(145deg, rgba(37, 99, 235, 0.24), rgba(16, 24, 39, 0.96) 68%),
        var(--theme-surface) !important;
}

.raffles-active__list > :nth-child(6n + 2),
.raffles-public-results__list > :nth-child(6n + 2),
.raffles-history__list > :nth-child(6n + 2) {
    border-color: #8b5cf6 !important;
    background:
        linear-gradient(145deg, rgba(124, 58, 237, 0.23), rgba(16, 24, 39, 0.96) 68%),
        var(--theme-surface) !important;
}

.raffles-active__list > :nth-child(6n + 3),
.raffles-public-results__list > :nth-child(6n + 3),
.raffles-history__list > :nth-child(6n + 3) {
    border-color: #10b981 !important;
    background:
        linear-gradient(145deg, rgba(5, 150, 105, 0.22), rgba(16, 24, 39, 0.96) 68%),
        var(--theme-surface) !important;
}

.raffles-active__list > :nth-child(6n + 4),
.raffles-public-results__list > :nth-child(6n + 4),
.raffles-history__list > :nth-child(6n + 4) {
    border-color: #d99a25 !important;
    background:
        linear-gradient(145deg, rgba(217, 119, 6, 0.22), rgba(16, 24, 39, 0.96) 68%),
        var(--theme-surface) !important;
}

.raffles-active__list > :nth-child(6n + 5),
.raffles-public-results__list > :nth-child(6n + 5),
.raffles-history__list > :nth-child(6n + 5) {
    border-color: #06b6d4 !important;
    background:
        linear-gradient(145deg, rgba(8, 145, 178, 0.22), rgba(16, 24, 39, 0.96) 68%),
        var(--theme-surface) !important;
}

.raffles-active__list > :nth-child(6n),
.raffles-public-results__list > :nth-child(6n),
.raffles-history__list > :nth-child(6n) {
    border-color: #f43f5e !important;
    background:
        linear-gradient(145deg, rgba(225, 29, 72, 0.21), rgba(16, 24, 39, 0.96) 68%),
        var(--theme-surface) !important;
}

.raffles-active__list > .active-raffle a,
.raffles-public-results__list > .raffle-public-result a,
.raffles-history__list > .raffle-entry a,
.raffle-my-prize__transaction {
    color: var(--theme-accent) !important;
    text-decoration-color: rgba(106, 174, 255, 0.52) !important;
}

/* Статуси зберігають семантичні кольори, але без світлих плям. */
.status-badge,
.admin-icon-badge,
.admin-position-badge {
    background: rgba(148, 163, 184, 0.14) !important;
    color: #cbd5e1 !important;
}

.status-badge--active,
.status-badge--completed,
.status-badge--confirmed,
.status-badge--winner,
.admin-verification-badge--verified {
    background: var(--theme-success-bg) !important;
    color: #8cebb8 !important;
}

.status-badge--scheduled,
.admin-icon-badge,
.admin-position-badge {
    background: var(--theme-accent-soft) !important;
    color: #9bc8ff !important;
}

.status-badge--pending,
.status-badge--drawing,
.status-badge--confirmation,
.status-badge--potential_winner,
.status-badge--confirmation_pending {
    background: var(--theme-warning-bg) !important;
    color: #f4d98e !important;
}

.status-badge--cancelled,
.status-badge--confirmation_expired,
.status-badge--condition_failed,
.status-badge--disqualified {
    background: var(--theme-danger-bg) !important;
    color: #ffabb6 !important;
}

@media (max-width: 700px) {
    .site-header {
        position: static;
    }

    main {
        padding-top: 26px;
    }

    .site-navigation a {
        padding: 4px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ==========================================================
   CORPORATE FUND
========================================================== */

html[data-theme="dark"] .corporate-fund-panel {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .corporate-fund-panel__heading h3,
html[data-theme="dark"] .corporate-rewards__heading h3 {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .corporate-fund-panel__heading p,
html[data-theme="dark"] .corporate-rewards__heading p {
    color: var(--theme-muted) !important;
}

html[data-theme="dark"] .corporate-fund-grid article,
html[data-theme="dark"] .corporate-reward-row {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-raised) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .corporate-fund-grid strong,
html[data-theme="dark"] .corporate-reward-row strong {
    color: var(--theme-accent) !important;
}

html[data-theme="dark"] .corporate-fund-grid span,
html[data-theme="dark"] .corporate-reward-row time {
    color: var(--theme-muted) !important;
}

html[data-theme="dark"] .corporate-rewards {
    border-color: var(--theme-border) !important;
}
