.lw-notification-settings {
    --notification-surface: #16171f;
    --notification-surface-raised: #1c1d27;
    --notification-surface-soft: rgba(255, 255, 255, 0.035);
    --notification-border: rgba(255, 255, 255, 0.09);
    --notification-border-strong: rgba(255, 255, 255, 0.14);
    --notification-text: #f4f4f7;
    --notification-muted: #989aa8;
    --notification-accent: #cf1763;
    --notification-accent-soft: rgba(207, 23, 99, 0.14);
    --notification-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
    color: var(--notification-text);
}

html[data-theme="light"] .lw-notification-settings,
body[data-theme="light"] .lw-notification-settings,
body.light-theme .lw-notification-settings,
body.lw-light-theme .lw-notification-settings {
    --notification-surface: #ffffff;
    --notification-surface-raised: #ffffff;
    --notification-surface-soft: #f7f7fa;
    --notification-border: rgba(24, 25, 34, 0.09);
    --notification-border-strong: rgba(24, 25, 34, 0.14);
    --notification-text: #20212a;
    --notification-muted: #727583;
    --notification-accent-soft: rgba(207, 23, 99, 0.09);
    --notification-shadow: 0 18px 45px rgba(29, 30, 41, 0.08);
}

.lw-notification-settings-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 24px 26px;
    border: 1px solid var(--notification-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 92% 18%, rgba(207, 23, 99, 0.2), transparent 34%),
        linear-gradient(135deg, var(--notification-accent-soft), transparent 48%),
        var(--notification-surface);
    box-shadow: var(--notification-shadow);
}

.lw-notification-settings-hero::after {
    position: absolute;
    right: -52px;
    bottom: -80px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(207, 23, 99, 0.16);
    border-radius: 50%;
    content: "";
}

.lw-notification-settings-hero-icon,
.lw-preference-card-icon,
.lw-preference-item-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: var(--notification-accent);
    background: var(--notification-accent-soft);
}

.lw-notification-settings-hero-icon {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(207, 23, 99, 0.22);
    border-radius: 16px;
    font-size: 22px;
}

.lw-notification-settings-hero h1,
.lw-preference-card-header h2 {
    margin: 0;
    color: var(--notification-text);
    font-weight: 700;
}

.lw-notification-settings-hero h1 {
    font-size: 1.42rem;
    line-height: 1.25;
}

.lw-notification-settings-hero p,
.lw-preference-card-header p,
.lw-notification-settings-actions small {
    margin: 5px 0 0;
    color: var(--notification-muted);
    line-height: 1.55;
}

.lw-notification-settings-grid {
    margin-right: -10px;
    margin-left: -10px;
}

.lw-notification-settings-grid > [class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
}

.lw-preference-card {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--notification-border);
    border-radius: 16px;
    background: var(--notification-surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
}

.lw-preference-card-header {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 19px 20px;
    border-bottom: 1px solid var(--notification-border);
    background: linear-gradient(135deg, var(--notification-surface-soft), transparent);
}

.lw-preference-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 16px;
}

.lw-preference-card-header h2 {
    font-size: 1.02rem;
    line-height: 1.3;
}

.lw-preference-card-header p {
    font-size: 0.8rem;
}

.lw-preference-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 76px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--notification-border);
    transition: background-color 160ms ease, border-color 160ms ease;
}

.lw-preference-item:last-child {
    border-bottom: 0;
}

.lw-preference-item:hover {
    background: var(--notification-surface-soft);
}

.lw-preference-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 14px;
}

.lw-preference-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.lw-preference-copy strong,
.lw-preference-select-row strong,
.lw-notification-settings-actions strong {
    color: var(--notification-text);
    font-size: 0.91rem;
    font-weight: 600;
    line-height: 1.35;
}

.lw-preference-copy small,
.lw-preference-select-row small {
    display: block;
    margin-top: 4px;
    color: var(--notification-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.lw-preference-disabled {
    opacity: 0.55;
}

.lw-preference-switch {
    flex: 0 0 44px;
    min-height: 24px;
    margin-left: auto;
    padding-left: 44px;
}

.lw-preference-switch .custom-control-label {
    min-height: 24px;
    cursor: pointer;
}

.lw-preference-switch .custom-control-label::before {
    top: 0;
    left: -44px;
    width: 44px;
    height: 24px;
    border: 1px solid var(--notification-border-strong);
    border-radius: 999px;
    background: var(--notification-surface-soft);
    box-shadow: none;
}

.lw-preference-switch .custom-control-label::after {
    top: 3px;
    left: -41px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--notification-muted);
}

.lw-preference-switch .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--notification-accent);
    background: var(--notification-accent);
}

.lw-preference-switch .custom-control-input:checked ~ .custom-control-label::after {
    background: #ffffff;
    transform: translateX(20px);
}

.lw-preference-switch .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px rgba(207, 23, 99, 0.16);
}

.lw-preference-switch .custom-control-input:disabled ~ .custom-control-label {
    cursor: not-allowed;
}

.lw-preference-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
}

.lw-preference-select-row > div {
    flex: 1 1 auto;
}

.lw-preference-select-row .custom-select {
    flex: 0 1 310px;
    width: 310px;
    height: 44px;
    border-color: var(--notification-border-strong);
    border-radius: 10px;
    color: var(--notification-text);
    background-color: var(--notification-surface-raised);
}

.lw-notification-settings-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 4px;
    padding: 18px 20px;
    border: 1px solid var(--notification-border);
    border-radius: 15px;
    background: var(--notification-surface);
}

.lw-notification-settings-actions > div {
    display: flex;
    flex-direction: column;
}

.lw-notification-settings-actions .btn {
    flex: 0 0 auto;
    min-width: 178px;
    padding: 11px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(207, 23, 99, 0.2);
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .lw-notification-settings-hero {
        align-items: flex-start;
        padding: 20px;
        border-radius: 15px;
    }

    .lw-notification-settings-hero-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .lw-notification-settings-hero h1 {
        font-size: 1.18rem;
    }

    .lw-preference-card {
        border-radius: 14px;
    }

    .lw-preference-card-header,
    .lw-preference-item {
        padding-right: 15px;
        padding-left: 15px;
    }

    .lw-preference-item {
        gap: 10px;
    }

    .lw-preference-item-icon {
        width: 34px;
        height: 34px;
    }

    .lw-preference-copy strong {
        font-size: 0.86rem;
    }

    .lw-preference-copy small {
        font-size: 0.72rem;
    }

    .lw-preference-select-row,
    .lw-notification-settings-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .lw-preference-select-row .custom-select {
        flex-basis: auto;
        width: 100%;
    }

    .lw-notification-settings-actions .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .lw-notification-settings-hero {
        gap: 12px;
        padding: 17px 15px;
    }

    .lw-notification-settings-hero p {
        font-size: 0.78rem;
    }

    .lw-preference-card-header {
        align-items: flex-start;
    }

    .lw-preference-item-icon {
        display: none;
    }
}
